展开全部
Scanner reader=new Scanner(System.in);
int a = 0,b = 0,c,d;
System.out.println("请输入:");
while(reader.hasNext()){
a=reader.nextInt();
b=reader.nextInt();
c=reader.nextInt();
d=reader.nextInt();
System.out.println("输出:");
System.out.println( a + "+" + b + "= ?");
System.out.println( c + "+" + d + "= ?");
System.out.println((a+b));
System.out.println((c+d));
}
效果:请输入:
1 2
3 4
输出:
1+2= ?
3+4= ?
3
7
你不要 + 和 = 可以32313133353236313431303231363533e59b9ee7ad9431333335343362去掉