import java.util.Scanner;
public class 第八次 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("请输入第一个数:");
int a = sc.nextInt();
System.out.print("请输入第二个数:");
int b = sc.nextInt();
System.out.print("请输入运算符:");
String c = sc.next();
int q;
int w;
int r;
int t;
if (c.equals("+")){
q=a+b;
System.out.println("运算结果为:"+q);
}
if (c.equals("*")){
w=a*b;
System.out.println("运算结果为:"+w);
}
if (c.equals("/")){
r=a/b;
System.out.println("运算结果为:"+r);
}
if (c.equals("-")){
t=a-b;
System.out.println("运算结果为:"+t);
}
System.out.println(" ");
System.out.println("下一组");
System.out.print("请输入第一个数:");
while(sc.hasNext()){
int a1 = sc.nextInt();
System.out.print("请输入第二个数:");
int b1 = sc.nextInt();
System.out.print("请输入运算符:");
String c1 = sc.next();
int q1;
int w1;
int r1;
int t1;
if (c1.equals("+")){
q1=a1+b1;
System.out.println("运算结果为:"+q1);
}
if (c1.equals("*")){
w1=a1*b1;
System.out.println("运算结果为:"+w1);
}
if (c1.equals("/")){
r1=a1/b1;
System.out.println("运算结果为:"+r1);
}
if (c1.equals("-")){
t1=a1-b1;
System.out.println("运算结果为:"+t1);
}
System.out.println(" ");
System.out.println("下一组");
System.out.print("请输入第一个数:");
}
sc.close();
}
}