풀이
a,b를 0으로 입력하면 반복문을 벗어나면 된다.
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
while(true){
int a = sc.nextInt();
int b = sc.nextInt();
if(a == 0 && b == 0)break;
System.out.println(a + b);
}
}
}