Thursday, September 20, 2012

program to check the number is positive or negative

" program to check the number is positive or negative"
#include<conio.h>
#include<stdio.h>
void main()
{
int n;
clrscr();
printf("Enter the number\n");
scanf("%d",&n);
if(n>0)
{
printf("Yes the number is positive\n");
}
else
{
printf("sorry the number is negative\n");
}
getch();
}

No comments:

Post a Comment