0
why my code isn't working ..i have made a calculator earlier using switch...but now i want it to work using if statement
3 Respostas
+ 1
Syntax error @ if(op='+')
u should use == for comparison.
if(op=='/')
+ 1
You are doing an assignment in the if statements, not a comparison, use == instead of =.
Also use more else, currently the error gets triggered when the user enters any operator besides '/'
0
thanks guys...,its working now