Commit 5f34388c authored by irada chinnachat's avatar irada chinnachat

ส่งงานสัปดาห์ที่สาม

parent aaab027a
const readline = require('readline');
const r = readline.createInterface({
input: process.stdin,
output: process.stdout
})
let i = 0
let data = []
r.on('line', (line) => {
data[i]= line
//console.log(${label[i]} == ${line} and i = ${i})
i++
if(i == 3) {
data[1] = 2561-data[1]
console.log(`สวัสดีคุณ ${data[0]} คุณอายุ ${data[1]} ปี เบอร์ ${data[2]}`)
r.close()
}
})
{
"name": "week03",
"version": "1.0.0",
"description": "การบ้านสัปดาห์ที่ 3",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"homework",
"03"
],
"author": "5811403426",
"license": "ISC"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment