Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Create 8rimMP.js #1583

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions RFJiig/8rimMP.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// program that check a number is positive.
// input from the user
const number = parseInt(prompt("Enter a number: "));

// check if number is greater than 0
if (number > 0) {
console.log("The number is positive");
}

// check if number is 0
else if (number == 0) {
console.log("The number is zero");
}

// if number is less than 0
else {
console.log("The number is negative");
}