005-002-010
If-Else: Positive or Negative
Easy
Problem Description
If-Else: Positive or Negative
In this problem, you will create a program that reads an integer from standard input, uses an if-else statement to determine whether it is positive or not, and displays the result to standard output.
Learning Objective: Understand how to implement two-branch logic using if-else statements
Overview
Create a program that determines whether a given number is positive or not.
Specifications
- Read one integer from standard input
- Use if-else statement to check positivity
- Output "Positive" if positive, "Not positive" if zero or negative
Input Format
integer
Output Format
Positive
or
Not positive
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up