Java实现两个整数的加减乘除运算
import java.util.Scanner;
public class CountScore {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input=new Scanner(System.in);
System.out.println("请输入你要计算的整数:");
int a=input.nextInt();
int b=input.nextInt();
System.out.println(a+b);
System.out.println(a-b);
System.out.println(a*b);
System.out.println(a/b);
}
}
运行结果: