Java/백준

1000

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);
}

'Java > 백준' 카테고리의 다른 글

11720 : split(), Integer.parseInt("문자열")  (0) 2022.06.01
10869  (0) 2022.06.01
11718  (0) 2022.06.01
10172  (0) 2022.06.01
7287  (0) 2022.06.01