1-4-01:判断数正负

描述

给定一个整数N,判断其正负。

输入一个整数N(-109 <= N <= 109)输出如果N > 0, 输出positive;
如果N = 0, 输出zero;
如果N < 0, 输出negative样例输入

1

样例输出

positive
#include<stdio.h>
int main()
{
    int n;
    scanf("%d",&n);
    if(n>=0)
        if(n==0)
            printf("zero");
        else 
            printf("positive");
    else 
        printf("negative");
    return 0;
}
原文地址:https://www.cnblogs.com/MicahelOD/p/5002895.html