0
How to calculate two no in single line opreation?
i want to 10+20 result but i get missmatchexception https://code.sololearn.com/ck5Aqg3ESX7n/?ref=app
5 odpowiedzi
+ 5
Also try 10 + 20 (spaces between the parts). It works for me.
+ 4
You don't enter like this, enter like this:-
10
+
20
Then the output show.
+ 1
but why don't enter like this 10+20...?
+ 1
Nik Shri if there are no blank space between, then it is just a single string.
+ 1
I would input a string, check what operator has been used and then use the correct output, check out switch case, and comparing chars using String.charAt(position), also you will have convert string numbers to integers.