BASIC_CALCulator

https://ide.codingblocks.com/s/52079
this is not the solution to the question,
but still what is the error in the code,it is not showing right result while inputing +,-,*,/,%’.

please help me with it

Hey Mudit instead of using all the if checks use else if, as shown in the code snippet below

             if(a='+'){
			  k= n1+n2;}
		else if(a='-'){
			  k=n1-n2;}
		else if(a='*'){
			  k=n1*n2;}
	    else if(a='/'){
			 k=n1 / n2;}
		else if(a='%'){
			 k=n1 % n2;}

And use while loop to take the next char input.

what is the problem with using if