Write a C programme to find the given integer positive or negative

 #include<stdio.h>


int main()

    int a;

    scanf("%d",&a);

     if(a>=1)

     {

        printf("Positive Integer\n");

     }

     else

     {

        printf("Negative Integer\n");

     }

    

    return 0;

}



After writing the code, now compile it and run it your IDE, give some user input and check the results.

Comments

Popular posts from this blog

Access denied in VS code for gcc while doing C programming

C program to find the greatest of three numbers with user input.

HackerRank 30 Days Of Code Challenge, Day29(Ques 30 in Java)