int calculateArea(int length, int width) // this is not a "void" because we are returning a value of type integer
{
return length * width;
}
void setup() { // void is a function that runs a program
Serial.begin(9600);
}
void loop() {
int lengthMeasure = 10;
int widthMeasure = 5;
int area = calculateArea(lengthMeasure,widthMeasure); // we are calling the function and sending the two values with it
Serial.print("The area of the rectangle is: ");
Serial.print(area);
Serial.println(" ");
delay(1000);
}