package demo10_28;
import java.util.Scanner;
public class homework01 {
public static void main(String[] args) {
System.out.println("请输入两个数和符号");//输入时提示
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
String str = sc.next();//输入语句
switch (str) {//判断str,以str的结果来决定接下来的步骤
case "+"://执行过程
System.out.println(x + y);
break;
case "-":
System.out.println(x - y);
break;
case "*":
System.out.println(x * y);
break;
case "/":
System.out.println(x / y);
break;
default:
System.out.println("输入错误");
}
}
}