Posted by : Waqas Javed Saturday, 17 January 2015

//Program to tell whether entered number is +ive,-ive or Zero
#include<stdio.h>
#include<conio.h>
//main function
void main()
{
int x;

printf("Enter x:");
scanf("%d",&x);

if(x==0)
{
printf("The number  is Zero");
}
else if(x>0)
{
printf("The number is Positive");
}
else if(x<0)
{
printf("The number is Negative");
}
getch();
}

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Popular Post

Powered by Blogger.

- Copyright © BSCS -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -