How to check positive and negative number in c ?

#include<stdio.h>
int main ()
{
float i;
printf(“Enyter any number to check it is Negative or positive”);
scanf(“%f”,&i);
if(i>=0.0)
printf(“It is a Positive Number”);
else
printf(“It is a negative number”);
}

Leave a Reply