fork download
  1. #include<iostream>
  2. #include<string>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n,num;
  8. string number;
  9. cin>>n;
  10. for(int i=0;i<n;i++)
  11. {
  12. cin>>number;
  13. num=stoi(number);
  14. if(num%2==0)
  15. cout<<"even"<<endl;
  16. else
  17. cout<<"odd"<<endl;
  18. }
  19. return 0;
  20. }
Success #stdin #stdout 0s 3460KB
stdin
3
100
0
1111
stdout
even
even
odd