diff --git a/RFJiig/8rimMP.js b/RFJiig/8rimMP.js new file mode 100644 index 0000000..1856ca2 --- /dev/null +++ b/RFJiig/8rimMP.js @@ -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"); +}