U

2. Check Sign of Integer

Easy

Problem Description

Given an integer NN, determine whether it is positive, negative, or zero.

Input Format

A single line containing an integer NN.

Output Format

Print Positive if N>0N > 0, Negative if N<0N < 0, or Zero if N=0N = 0.

Example 1:
Input:
42
Output:
Positive
Explanation: 42 is strictly greater than 0, so it is Positive.
Example 2:
Input:
-17
Output:
Negative
Explanation: -17 is strictly less than 0, so it is Negative.
Example 3:
Input:
0
Output:
Zero
Explanation: 0 is neither positive nor negative.
Constraints:
  • -10^9 <= N <= 10^9
  • Time complexity target: O(1)
  • Auxiliary space target: O(1)
Follow up:How would you classify numbers with floating-point tolerance (epsilon)?
1,180 Online