C program to check whether a number is positive, negative

	#include <stdio.h>
	int main()
	   int num;
		printf("Enter any number: ");
		scanf("%d", &num);
		if(num > 0)
			printf("Number is Positive");
		else if(num <0)
			printf("Number is Negative");
		else printf("Number is zero");


	Enter any number: -34                                                                                                  
	Number is Negative   
	Enter any number: 34                                                                                                  
	Number is Positive  

Compile and Run Online

Subscribe For Daily Updates