Program to check whether user entered number is Positive of Negative or zero

//Program to check whether user entered number is Positive of Negative or zero
#include<stdio.h>
#include<conio.h>
int main()
{
int a;
clrscr();
printf("Enter any One Integer Numbers\n");
scanf("%d",&a);
if(a==0)
printf("Entered number is Zero");
else if(a>=1)
       printf("entered Integer is +ve");
       else if(a<0)
        printf("Entered Integer is -ve");

getch();
return 0;
}


To Run this Program Copy it in text editor and save as .c
Then double click on it and then it will get opened in your compiler.
Click on run.

No comments:

Post a Comment