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

Static

Output 

Dynamic

Output 

// Write a C program to check whether a number is negative , positive and zero.
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a;
printf(“Enter the number :- “);
scanf(“%d”,&a);
if (a>0)
{
printf(“Positive number :- %d”,a);
}
else if (a<0)
{
printf(“Negative number :- %d”,a);
}
else
{
printf(“Number is Zero”);
}
getch( );
}