Check Positive Negative Zero
This is a basic comparison problem. You are given one integer, and your task is to decide whether the value is above zero, below zero, or exactly zero.
If the number is greater than 0, print POSITIVE. If the number is less than 0, print NEGATIVE. If the number is exactly 0, print ZERO.
The goal is simply to check the value and return the correct label.
Example Input & Output
Because the value is exactly 0.
Because -3 is less than 0.
Because 8 is greater than 0.
Algorithm Flow

Solution Approach
A clear way to solve this is to check the number in order.
First, read the integer. After that, compare it with 0.
If the number is greater than 0, print POSITIVE.
If it is not greater than 0, check whether it is less than 0. If yes, print NEGATIVE.
If neither condition is true, the number must be exactly 0, so print ZERO.
Best Answers
Solutions Coming Soon
Verified best solutions for this Challenge are still being analyzed and will be available soon.
Comments (0)
Join the Discussion
Share your thoughts, ask questions, or help others with this Challenge.
