Playground/자바문제집

[백준] 10952번

미숫가루설탕많이 2023. 1. 19. 23:04
import java.util.Scanner;

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

      while (true) {
         int x = sc.nextInt();
         int y = sc.nextInt();
         if (x == 0 && y == 0) break;   // 입력받은 두 값이 0이면 탈출
         System.out.println(x + y);
      }
   }
}

'Playground > 자바문제집' 카테고리의 다른 글

[백준] 10951번  (0) 2023.01.20
[백준] 1110번  (0) 2023.01.19
[백준] 2439번  (0) 2023.01.19
[백준] 2438번  (0) 2023.01.19
[백준] 11022번  (0) 2023.01.19