Write a program in c to check the number is positive or negative

C Program to Check the Number is Positive or Negative

#include<stdio.h>
#include<conio.h>
main()
{
int a;
printf("enter the number");
scanf("%d",&a);
if(a>0)
{
printf("a is positive");
}
else
{
printf("a is negetive");
}
getch();
}

Output:






Post a Comment

0 Comments