Challenge: Positive, Negative or Zero

Lab C Beginner 10 points

Read a whole number and print positive, negative or zero.

Input

One integer.

Output

One word.

Example

Input

5

Output

positive
Sample input available Sample output available
Editor
C

Hints

You need three paths: if, else if and else.

Zero is neither greater nor less than 0.

Solution explanation

Each number falls into exactly one of the three branches.

Show solution
#include <stdio.h>

int main() {
    int n;
    scanf("%d", &n);
    if (n > 0) {
        printf("positive\n");
    } else if (n < 0) {
        printf("negative\n");
    } else {
        printf("zero\n");
    }
    return 0;
}
Output
Answer
HOME LABS COMMUNITY DASHBOARD