Skip to main content
C Program to check whether the given number is positive or negative
#include<stdio.h>
int main()
{
int number;
printf("Enter the number\n");
scanf("%d",&number);
if(number>0)
printf("%d is Positive",number);
else if(number<0)
printf("%d is Negative",number);
else
printf("%d is zero",number);
}
Output:
Comments
Post a Comment