Find positive or negative number
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("\nEnter any number :");
scanf("%d",&a);
if(a>=0)
{
printf("\nIt is a positive number");
}
else
{
printf("\nIt is a negative number");
}
getch();
}
Output
Enter any number :3
It is a positive number
|
Comments
Post a Comment