C Programming
{
int a;
printf("Enter a no.");
scanf("%d",&a);
if(a<0 br=""> printf("Negative No.");
}
else
{
printf("Positive No.");
}
getch();
}
Input: -5
0>C Programming
Write a C program to input a no and check it negative or positive no.
void main(){
int a;
printf("Enter a no.");
scanf("%d",&a);
if(a<0 br=""> printf("Negative No.");
}
else
{
printf("Positive No.");
}
getch();
}