/* Operatori base */ int a = 5; int b = 10; int c = 20; void setup() // run once, when the sketch starts { Serial.begin(9600); // set up Serial library at 9600 bps Serial.println("Here is some math: "); Serial.print("a = "); Serial.println(a); Serial.print("b = "); Serial.println(b); Serial.print("c = "); Serial.println(c); Serial.print("a + b = "); // add Serial.println(a + b); Serial.print("a * c = "); // multiply Serial.println(a * c); Serial.print("c / b = "); // divide Serial.println(c / b); Serial.print("b - c = "); // subtract Serial.println(b - c); Serial.print("b modulo a = "); // Calculates the remainder when one integer is divided by another. Serial.println(b % a); Serial.print("8 modulo 3 = "); // Calculates the remainder when one integer is divided by another. Serial.println(8 % 3); Serial.print("a incrementato ++ = "); // Increments Serial.println(a++); // Increments AFTER the call Serial.print("valore attuale di a: "); Serial.println(a); Serial.print("++a incrementato = "); Serial.println(++a); // Increments BEFORE the call Serial.print("b decrementato -- = "); // Decrement Serial.println(b--); Serial.print("valore attuale di b: "); Serial.println(b); Serial.print("--b decrementato = "); Serial.println(--b); } void loop() // we need this to be here even though its empty { }