#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 negative number. Show all posts
Showing posts with label negative number. Show all posts
Tuesday, 15 April 2014
Check the number positive or negative
Subscribe to:
Comments (Atom)
Comment
Comment Box is              loading comments...