hs_developer 2022. 6. 1. 15:41

1000

 

1. 문제

두 수를 입력 받은 후 A+B 출력

 

2. 풀이

Scanner 객체 생성해 두 수 입력 받은 후 출력

 

3. 코드 

 

public static void main(String[] args) {
		
    Scanner sc = new Scanner(System.in);

    int a = sc.nextInt();
    int b = sc.nextInt();

    System.out.println(a+b);
}