문제
2739번: 구구단
N을 입력받은 뒤, 구구단 N단을 출력하는 프로그램을 작성하시오. 출력 형식에 맞춰서 출력하면 된다.
www.acmicpc.net
정답
let fs = require("fs");
let filePath = process.platform === "linux" ? "/dev/stdin" : "test.txt";
let input = Number(fs.readFileSync(filePath).toString());
let n = 1;
while (n < 10) {
console.log(`${input} * ${n} = ${input * n}`);
n++;
}