Tuesday, December 30, 2014

Write A Program (WAP) to Find Entered Number is Positive OR Negative


Write A Program (WAP) to Find Entered Number is Positive OR Negative

#include<stdio.h>
#include<conio.h>
void main( )
{
int a;
printf("n Enter a number:");
scanf("%d", &a);
if(a>0)

printf( "n The number %d is positive.",a);
}
else
{
printf("n The number %d is negative.",a);
}
getch();
}

No comments:

Post a Comment