A number is said to be positive if it is greater than zero and negative if less than zero.
#include<stdio.h>
void main()
{
int n;
printf("Enter a number: ");
scanf("%d",&n);
if(n==0)
printf("The number is Zero");
else if(n>0)
printf("The number is a positive number");
else
printf("The number is a negative number");
}
0 Comments