Write a c program to find if the entered no is positive,negative or zero.
void main()
{
int n;
clrscr();
printf("Enter value of n:");
sacnf("%d",&n);
if(n>o)
{
printf("%d is Positive Number",n);
}
else if (n<o)
{
printf("%d i9s Negative Number);
}
else
{
printf("Entered number is Zero");
}
getch();
}
Comments
Post a Comment