๋ชฉ๋กํ์ง ๊ตฌ๋ถํ๊ธฐ (1)
๐ค ์์งlog ๐ค

ํ๋ก๊ทธ๋๋จธ์ค Lv.0 - ํ์ง ๊ตฌ๋ถํ๊ธฐ ๐ ๋ฌธ์ ์ค๋ช ๐ ์ ํ์กฐ๊ฑด 1 โค n โค 1,000 ๐ ํ์ด const readline = require('readline'); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); let input = []; rl.on('line', function (line) { input = line.split(' '); }).on('close', function () { n = Number(input[0]); if (n % 2 === 0) { console.log(`${n} is even`); } else { console.log(`${n} is odd`); } }); โ N..
๐ ํ๋ก๊ทธ๋๋จธ์ค
2024. 4. 11. 15:50