C code for checking positive or negative


       #include <stdio.h>
    #include <stdlib.h>

    int main(void) {
    int num;
    printf("enter the number"); fflush(stdout);
    scanf("%d",&num);
    if(num<0){
        printf("number is negative");fflush(stdout);
    }
    else{
        printf("number is positive");fflush(stdout);
    }



    return EXIT_SUCCESS;

Comments