0
Why isnt this calculator working?
If you put in a calculation(like 1+1,and you have to do a new line for everything)it says that it is invalid!(my program is supposed to detected if the input is right or not and output it)here is the program. https://code.sololearn.com/c6DcZ36Gzd3w/?ref=app
3 Réponses
+ 2
From your logic of if else statement it shoult be written:
var tryagain: Boolean = false;
+ 1
Your welcome!
I would like to recommend you to read more about if else statements etc.
You had the boolean variable tryagain assigned. That means it‘s alredy boolean and do not need to write „tryagain == false“. From this reason it should looks like:
if(tryagain){ your ... code} else { your code}.
Have fun while learning.
0
Thanks a lot!
It worked!