import java.util.*;
public class Main {
public static void main(String args[]) {
// Your Code Here
Scanner sc=new Scanner(System.in);
char ch;
int ans=0;
do{
ch=sc.next().charAt(0);
while(ch!='+'&&ch!='-'&&ch!='*'&&ch!='/'&&ch!='%' && ch!='x'&& ch!='X'){
System.out.println("Invalid operation. Try again");
ch=sc.next().charAt(0);
}
if(ch==‘x’||ch==‘X’){
break;
}
int N1=sc.nextInt();
int N2=sc.nextInt();
if(ch==’+’){
ans=N1+N2;
System.out.println(ans);
}
else if(ch==’-’){
ans=N1-N2;
System.out.println(ans);
}
else if(ch==’’){
ans=N1N2;
System.out.println(ans);
}
else if(ch==’%’){
if(N2!=0){
ans=N1%N2;
System.out.println(ans);
}
else{
return;
}
}
else if(ch==’/’){
if(N2!=0){
ans=N1/N2;
System.out.println(ans);
}
}
}
while(ch!='x'&&ch!='X');
}
} while compiling iam getting same output but when i submit it test cases are failed