Full width home advertisement

HTML

Tech News

Ad

 Write a c program to find that the accepted number is Negative, Positive or Zero.



#include<stdio.h>
#include<conio.h>
void main()
  {
	int a;
	clrscr();
	printf("Enter number");
	scanf("%d",&a);
	if(a<0){printf("\nNumber %d is Negative",a);}
	else if(a==0){printf("Number %d is zero",a);}
	else{printf("Number %d is positive",a);}
	getch();
  }

Thank you for your time seeya Again

No comments:

Post a Comment

Bottom Ad [Post Page]