A+B
두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오.
baekjun
A+B
문제
- Write a program that prints A+B after two(2) integer inputs A and B.
입력
- The firs of the line gets integer A and B (0 < A, B < 10)
출력
- Print A+B on the first line.
제출
Java8
import java.util.Scanner;
public class Main{
public static void main(String args[]){
int a,b;
Scanner scanner = new Scanner(System.in);
a = scanner.nextInt();
b = scanner.nextInt();
scanner.close();
System.out.println(a+b);
}
}