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();
}

Leave a Reply

Your email address will not be published. Required fields are marked *