Program No : 5 :

Write a program in C to check whether the given number positive ,negative or zero ?

   program no  : 5
purpose : check whether given number is postive , negative or zero.

#include <"stdio.h">

void main()

{
	int number;
	
	scanf("%d", &number);

	if ( number >0)

		 printf("postive");
	else
	{
		 if (number<0)

		     printf("negative");
		 else
			  
			  printf("zero");
	}

}  


Back