Write a program to find weather the entered number is positive negative or zero.

Write a program to find weather the entered number is positive negative or zero.

 

#include<stdio.h>

#include<conio.h>

{

clrscr();

int a;

printf(”Enter a number:“);

scanf(“%d”, &a);

if(a>0)

{

printf(“%d  is positive number”, a);

}

elseif (a<0)

{

printf(“%d is negative number”, a);

}

else

{

printf(“you entered zero”);

}

getch();

}

 

Output:

 

Enter a number:0

you entered zero


Comments