1 class Input02{
2 public static void main(String[ ]args){
3 //计算两个数的和
4 Scanner input = new Scanner(System.in);
5 System.out.print("请输入第一个数:");
6 int num1 = input.nextInt();
7 System.out.print("请输入第二个数:");
8 int num2 = input.nextInt();
9 int sum = num1 + num2;
10 System.out.print(num1 + "+" + num2 + "=" + sum);
11 }
12 }