14th Jun 2021, 12:08 PM
Haral Raphel
Haral Raphel - avatar
3 Respostas
+ 5
By mistake you have not use + before oprater , at line no 26 correct one -> System.out.println(num1+" "+operator+" "+num2+" = "+answer); Line 6 , insted of num2 ,you wrote num1
14th Jun 2021, 12:27 PM
Abhiyantā
Abhiyantā - avatar
+ 2
Also, instead of declaring num1 and num2 you declared num1 twice Edit: Rishav Tiwari Ya, that too! lol
14th Jun 2021, 12:30 PM
ChaoticDawg
ChaoticDawg - avatar
+ 1
How are you expecting to receive the input? So far all you're attempting to get is the operator and not num1 or num2 (which are both set to 0). I.E. Do you expect to get both numbers and the operator in 1 input like; 2 * 5 Or do you expect to get each 1 at a time like; 2 * 5 Etc...
14th Jun 2021, 12:23 PM
ChaoticDawg
ChaoticDawg - avatar