From 9153a7704d283e438c4c243c1b538bbb5632b638 Mon Sep 17 00:00:00 2001 From: jdrhfskaaa-ctrl Date: Tue, 10 Feb 2026 17:34:54 +0900 Subject: [PATCH 1/2] =?UTF-8?q?intoroduction=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- members/saruwatari/intoroduction.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 members/saruwatari/intoroduction.md diff --git a/members/saruwatari/intoroduction.md b/members/saruwatari/intoroduction.md new file mode 100644 index 0000000..4fad5e7 --- /dev/null +++ b/members/saruwatari/intoroduction.md @@ -0,0 +1 @@ +こんにちは \ No newline at end of file From 2ded7e1d111a07651bf52a0dbc9a1cc76433c335 Mon Sep 17 00:00:00 2001 From: jdrhfskaaa-ctrl Date: Sun, 15 Feb 2026 09:35:03 +0900 Subject: [PATCH 2/2] =?UTF-8?q?phase1=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- members/saruwatarii/phase1/greeting.js | 32 ++++++++++++++++++++++++++ members/saruwatarii/phase1/ipo_crad.md | 9 ++++++++ 2 files changed, 41 insertions(+) create mode 100644 members/saruwatarii/phase1/greeting.js create mode 100644 members/saruwatarii/phase1/ipo_crad.md diff --git a/members/saruwatarii/phase1/greeting.js b/members/saruwatarii/phase1/greeting.js new file mode 100644 index 0000000..2387391 --- /dev/null +++ b/members/saruwatarii/phase1/greeting.js @@ -0,0 +1,32 @@ +const readline = require('readline'); + +const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout +}); + +rl.question('名前を入力してください: ', (name) => { + if (!name.trim()) { + console.error('エラー: 名前が入力されていません'); + rl.close(); + return; + } + + // Process: 時間帯に応じて挨拶を変える + const hour = new Date().getHours(); + let greeting; + + if (hour >= 5 && hour < 12) { + greeting = 'おはよう'; + } else if (hour >= 12 && hour < 18) { + greeting = 'こんにちは'; + } else { + greeting = 'こんばんは'; + } + + const result = `${name}、${greeting}`; + + // Output: 名前、挨拶 + console.log(result); + rl.close(); +}); \ No newline at end of file diff --git a/members/saruwatarii/phase1/ipo_crad.md b/members/saruwatarii/phase1/ipo_crad.md new file mode 100644 index 0000000..72aefb0 --- /dev/null +++ b/members/saruwatarii/phase1/ipo_crad.md @@ -0,0 +1,9 @@ +## IPOカード + +コードを書く**前に**、必ずIPOカードを記入する。 + +| 項目 | 内容 | +|------|------| +| **Input** |名前 | +| **Process** |受け取った名前に挨拶(こんにちは)とつける | +| **Output** |名前、こんにちは | \ No newline at end of file