this is the code
import java.util.;
public class Main {
public static void main(String args[]) {
Scanner sc=new Scanner(System.in);
while(true)
{
char ch=sc.next().charAt(0);
if(ch==’+’ || ch==’-’ || ch==’’ || ch==’/’)
{
double n1=sc.nextDouble();
double n2=sc.nextDouble();
if(ch==’+’)
{
System.out.println(n1+n2);
}
else if(ch==’-’)
{
System.out.println(n1-n2);
}
else if(ch==’’)
{
System.out.println(n1n2);
}
else
{
System.out.println(n1/n2);
}
}
else if(ch==‘x’ || ch==‘X’)
{
break;
}
else
{
System.out.println(“Invalid operation.Try Again”);
}
}
}
}