C program to find if a number is +ve /-ve or 0
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter any Integer:");
scanf("%d",&a);
if(a>0)
{
printf("\nGiven integer is positive");
}
if(a<0)
{
printf("\nGiven integer is negative");
}
if(a==0)
{
printf("\nGiven integer is zero");
}
getch();
}
0 Comments:
Post a Comment