0
What's the error
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
+ 2
Also, instead of declaring num1 and num2 you declared num1 twice
Edit: Rishav Tiwari Ya, that too! lol
+ 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...