Program code
#include <stdio.h>
#include <conio.h>
void main()
{
int num;
clrscr();
printf("Please input a number.\n");
scanf("%d", &num);
if (num= = 0)
printf("%d is zero.",num);
else if (num>0)
printf("%d is positive.",num);
else
printf("%d is zero.",num);
getch();
}
#include <stdio.h>
#include <conio.h>
void main()
{
int num;
clrscr();
printf("Please input a number.\n");
scanf("%d", &num);
if (num= = 0)
printf("%d is zero.",num);
else if (num>0)
printf("%d is positive.",num);
else
printf("%d is zero.",num);
getch();
}
Example of Output
Please input a number.
13
13 is positive.