#include <stdio.h>
int main()
{
float num;
printf("Enter a number: ");
scanf("%f",&num);
if (num<=0)
{
if (num==0)
printf("You entered zero.");
else
printf("%.2f is negative.",num);
}
else
printf("%.2f is positive.",num);
return 0;
}
All Computer Programming languages and its basics (C,C++,JAVA,PHP,SAP(ALL MODULES)
Showing posts with label positive number. Show all posts
Showing posts with label positive number. Show all posts
Tuesday, 15 April 2014
Check the number positive or negative
Subscribe to:
Posts (Atom)
Comment
Comment Box is loading comments...