Advertisement
nirobrasseen

Untitled

Feb 22nd, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     int a,i,n ;
  6.     cin>>n;
  7.     if(n<1000){
  8.     for(i=1;i<=n;i++)
  9.     {
  10.         cin>>a;
  11.  
  12.  
  13.  
  14.  
  15.     if(a==0)
  16.         cout<<"NULL"<<endl;
  17.  
  18.  
  19.        else  if(a<0 && (a%2==-1))
  20.        cout<<"ODD NEGATIVE"<<endl;
  21.  
  22.        else if(a<0 && (a%2==-0))
  23.        cout<<"EVEN NEGATIVE"<<endl;
  24.  
  25.  
  26.         else if(a>0 && (a%2==0))
  27.         cout<<"EVEN POSITIVE"<<endl;
  28.  
  29.         else if(a>0 && (a%2==1))
  30.         cout<<"ODD POSITIVE"<<endl;
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  }
  40.     }
  41.     return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement