This is a simple basic program which checks whether the number is positive or negative.
PROGRAM :
PROGRAM :
#include <stdio.h> #include <stdlib.h> int main() { float a; printf("Enter any number :\n"); scanf("%f",&a); if( a == 0) printf("%f is neither positive nor negative",a); else if( a > 0) printf("%f is a Positive number",a); else printf("%f is a Negative number",a); return 0; }OUTPUT :
C - Positive or Negative number |