给你两个整数,要求输出这两个整数的和
输入两个整数 a, b (0 <= a, b <= 1000)
输出一个整数.
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
System.out.println(a + b);
}
}
输入两个整数 a, b (0 <= a, b <= 1000)
输出一个整数.
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
System.out.println(a + b);
}
}
全部评论
相关推荐