Https://ide.codingblocks.com/s/291880

I am getting time exceed and not working

Refer this

It is also having same problem please run and check

With what test case are you trying.
I tested it with the sample test case and it is giving the correct result.
Submit the code and check if it passes all the test cases

It is having compiler error, you check the code please. I am also not unable to figure out

Provide me with the test case you are running the code.
Because in my side, the code which i have provided is running perfectly.

#include<iostream>

using namespace std;
int main() {
char ch;
cin>>ch;
int n1,n2,n3;
while( ch != β€˜x’ || ch != β€˜X’){
if (ch ==’+’){
cin>>n1>>n2;
n3 =n1+n2;
cout<<n3;
}
else if(ch == β€˜-’){
cin>>n1>>n2;
n3 = n1-n2;
cout<<n3;
}
else if( ch == β€˜β€™){
cin>>n1>>n2;
n3 = n1
n2;
cout<<n3;
}
else if(ch == β€˜/’){
cin>>n1>>n2;
n3=n1/n2;
cout<<n3;
}
else if( ch ==’%’){
cin>>n1>>n2;
n3 = n1%n2;
cout<<n3;
}
else
cout<<β€œinvalid operation.Try again”;

}

return 0;

}

exactly similar code but having
runguard: warning: timelimit exceeded (wall time): aborting command
runguard: warning: command terminated with signal 15

I got it thanks ,I was not taking input char again

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.