class CounterDemo {
public static void main(String[] args) {
System.out.println("此计算机支持加法,减法,乘法,除法,余数运算\n请输入第一数字");
Scanner sc = new Scanner(System.in);
int number1 = sc. nextInt();
System.out.println("请输入运算符");
String n = sc.next();
if (n == "+" || n == "-" || n == "*" || n == "/" || n == "%") {
System.out.println("请输入第二个数字");
int number2 = sc.nextInt();
if (n == "+") {
System.out.println(number1+"+"+number2+"="+(number1+number2));
}
else if (n == "-") {
System.out.println(number1+"-"+number2+"="+(number1-number2));
}
else if (n == "*") {
System.out.println(number1+"*"+number2+"="+(number1*number2));
}
else if (n == "/") {
System.out.println(number1+"/"+number2+"="+(number1/number2));
}
else if (n == "%") {
System.out.println(number1+"%"+number2+"="+(number1%number2));