You are on page 1of 1

int a, b, c;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}

void loop() {
// put your main code here, to run repeatedly:
Serial.println("Digite A");
while (Serial.available() == 0) {
}
a = Serial.parseInt();
delay(1000);
Serial.println("Digite B");
delay(1000);
while (Serial.available() == 0) {
}
b=Serial.parseInt();
c=a+b;
Serial.print("O resultado é:");
Serial.println(c);
}

You might also like