2.
|
To
check whether given number is positive, negative or zero.
|
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter The Value Of A=");
scanf("%d",&a);
if((a>=0)&&(a!=0))
{
printf("The Number Is Positive");
}
else if((a<=0)&&(a!=0))
{
printf("The Number Is Negative");
}
else
{
printf("The Number Is Zero");
}
getch();
}
Comments
Post a Comment