Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String a,b;
- int ans;
- int i = 1;
- void setup() {
- // put your setup code here, to run once:
- Serial.begin(9600);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- while(!(Serial.available()>0));
- while(Serial.available()>0)
- a = Serial.readStringUntil('\n');
- Serial.println("The Value Of A " + a);
- while(!(Serial.available()>0));
- while(Serial.available())
- b = Serial.readStringUntil('\n');
- Serial.println("The Value Of B " + b);
- ans = a.toInt()+b.toInt();
- Serial.println("The Value Of A + B " + String(ans));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement