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

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

How to add to integers in C programming

Check whether a character Vowel or Consonant