C Program to Find Given Integer is Positive or Negative

include

main()
{
int num;
printf(“Enter a Number to test ZERO or +ve or -ve :”);
scanf(“%d”,&num);
if(num==0)
printf(“Entered Number is ZERO”);
else
if(num>0)
printf(“%d is a Positive Number”,num);
else
printf(“%d is a Negative Numbr”,num);
}
OUTPUT:

Enter a Number to test ZERO or +ve or -ve :10
10 is a Positive Number

Leave a Reply

Your email address will not be published. Required fields are marked *