セクション 1. 章 40
single
Challenge: Checking if a Number is Even and Positive
メニューを表示するにはスワイプしてください
タスク
スワイプしてコーディングを開始
Write a program that checks whether a given number is even and positive.
Use an if statement with the logical AND (&&) operator to check two conditions:
- The number is greater than
0→num > 0. - The number is even →
num % 2 === 0.
If both conditions are true, display: "The number is positive and even."
Otherwise, display: "The number does not meet the criteria."
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 1. 章 40
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください