In this program, we are going to check whether the input number is positive or negative or zero.
if the input number is greater then zero then it is a positive number. If the input number is zero then it, not a positive number neither a negative number. If the number is less then zero then it is a negative number.
Program to Check whether a Number is Positive or Negative or Zero in C
printf("Enter a Number to test ZERO or +ve or -ve :");
if (num == 0)
printf("Entered Number is ZERO");
if (num > 0)
printf("%d is a Positive Number", num);
printf("%d is a Negative Numbr", num);
OUTPUT of Program to Check whether a Number is Positive or Negative or Zero in C