#include <stdio.h>
int main()
{
// 8. Write a C program to find that the accepted number is Negative, or Positive or Zero
printf("\tCheck A Number");
printf("\n===============================");
int num;
printf("\n\nEnter The Value Of A : ");
scanf("%f", &num);
printf("\n_______________________________\n\n");
if (num > 0)
{
printf("A Is positive");
}
else if (num < 0)
{
printf("A is Negative");
}
else if (num == 0)
{
printf("A is Zero");
}
printf("\n_______________________________\n\n");
return 0;
}
scanf
function.if-else
statements. If the number is greater than zero, it prints "A is positive". If the number is less than zero, it prints "A is negative". If the number is equal to zero, it prints "A is Zero".