wap to find whether the given int is positive, negetive or zero


/*wap to find whether the given int is positive, negetive or zero*/

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

void main()

{
	int n;
	clrscr();

	printf("enter any int:");
	scanf("%d",&n);

	if(n>=0)
		{
			if(n==0)
				printf("the number is zero");
			else
				printf("the number is positive");
		}
	else
		printf("the number is negetive");

	getch();
}

No comments:

Post a Comment