두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오.
입력은 여러 개의 테스트 케이스로 이루어져 있다.
각 테스트 케이스는 한 줄로 이루어져 있으며, 각 줄에 A와 B가 주어진다. (0 < A, B < 10)
입력의 마지막에는 0 두 개가 들어온다.
각 테스트 케이스마다 A+B를 출력한다.
1 1
2 3
3 4
9 8
5 2
0 0
2
5
7
17
7
const fs = require("fs");
const filePath = process.platform === "linux" ? "/dev/stdin" : "./input.txt";
let input = fs.readFileSync(filePath).toString().split("\n");
while (input[0][0] != 0) {
const numbers = input
.shift()
.split(" ")
.map((x) => +x);
console.log(numbers[0] + numbers[1]);
}