KodeGod.com

015. Write a program to accept a number and print if the number is Positive/Negative in C language

#include<stdio.h>
#include<conio.h>  

main()
{
 int n;
 clrscr();
 printf("Enter number..");
 scanf("%d",&n);
 if(n>0)
	printf("Given number is positive");
 else if(n<0)
	printf("Given number is negative");
 else
	printf("Number is Zero");
 getch();
}