]> git.piffa.net Git - sketchbook_andrea/blob - programming/functions/argomenti_2/argomenti_2.ino
Common esempi
[sketchbook_andrea] / programming / functions / argomenti_2 / argomenti_2.ino
1 void setup(){
2   Serial.begin(9600);
3 }
4
5 void loop() {
6 int latoA = 4;
7 int latoB = 3 ;
8
9 Serial.print("Area rettangolo = ");
10 Serial.println(calcolaArea(latoA, latoB));
11
12
13 Serial.flush();
14 exit(0);
15 }
16
17 // Funzioni
18
19 int calcolaArea(int a, int b){
20   int area = a * b ;
21   return area;
22 }
23