Program to check whether the given number is positive or negative


Program to check whether the given number is positive or negative

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

void main()
{
int n;

clrscr();

printf("\nEnter the number : ");
scanf("%d",&n);


if(n< 0)
{
printf("\nIt is a negative number");
}
else
{
printf("\nIt is a Positive number");
}

getch();
}

Output :

0 comments:

Post a Comment