There was an idea for a warm-up to make a project, the essence of which is as follows - I accept a couple of numbers (a and b) and number c. Depending on the values of c, a and b are added together (if c = 0) Or they are subtracted if c = 1 The problem is that the sketch does not accept values and does not calculate. In any case, does not produce a result. Please help with advice and analysis. I attach the code
void setup() { // put your setup code here, to run once: Serial.begin(9600); Serial.println("I'm ready"); Serial.println("Input a,b and operation"); Serial.println("Code operation"); Serial.println(" 0 - get summary"); Serial.println(" 1 - get negative"); } int k; int a,b,c; void loop() { // put your main code here, to run repeatedly: a = Serial.read(); b =Serial.read(); c = Serial.read(); if (c==0) { Serial.print("Result= "); Serial.println(a+b); } if (c==1) { Serial.print("Result= "); Serial.println(ab); } Serial.println("end loop"); }