Ad Code

Responsive Advertisement

1074 - Even or Odd

Author: Ismail Hosen

Daffodil International University





Problem Link

//Please follow from main function



#include<stdio.h>


int main()


{


    int i, t, n;


    scanf("%d", &t);


    for(i=1; i<=t; i++)


    {


        scanf("%d", &n);


        if(n==0)


        {


            printf("NULL\n");


        }


        if(n%2==0)


        {


            if(n>0)


            {


                printf("EVEN POSITIVE\n");


            }


            if(n<0)


            {


                printf("EVEN NEGATIVE\n");


            }





        }


        if(n%2!=0)


        {


            if(n>0)


            {


                printf("ODD POSITIVE\n");


            }


            else if(n<0)


            {


                printf("ODD NEGATIVE\n");


            }





        }





    }


    return 0;


}





Post a Comment

0 Comments