why my code isn't working ..i have made a calculator earlier using switch...but now i want it to work using if statement
Syntax error @ if(op='+') u should use == for comparison. if(op=='/')
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 '/'
thanks guys...,its working now