Sign of a Number
Easyjava
Read an integer and print positive, negative or zero based on relational comparisons with 0.
Input: one integer.
Output: one line — positive, negative or zero.
Example 1
Input
7
Output
positive
Example 2
Input
-3
Output
negative
- -1000000000 <= n <= 1000000000
Hint 1
Test n > 0, then n < 0, otherwise it is zero.
Hint 2
Use if / else if / else.
Three outcomes, decided by comparing n against 0: greater than 0 is positive, less than 0 is negative, and the remaining case is zero.