Write a C program to check whether a number is negative, positive or zero

  A number is said to be negative if it is less than zero and it is said to be positive  if it is greater than zero . So in the program we will check that number is greater than zero or not .So let’s start……….


int main()
int n;
printf(“Enter a number “);
printf(“Number is postive”);
else if(n==0)
printf(“Number is zero”);
printf(“Number is negative”);
return 0;


Enter a number
Number is negative

Video solution:-

Recommended Post:

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

Key points:-


Leave a Reply

Your email address will not be published.