asadlive84

Untitled

Aug 7th, 2016
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.     int i,a;
  5.     char num[100];
  6.     scanf("%d",&a);
  7.     for(i=0;i<a;i++)
  8.     {
  9.         scanf("%s",num);
  10.         int z=0;
  11.         for(z=0;num[z]!='\0';z++);
  12.  
  13.         if(num[z]%2==0 || num[z]==0)
  14.         {
  15.             printf("even\n");
  16.         }
  17.         else
  18.         {
  19.             printf("odd\n");
  20.         }
  21.     }
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment