P2955 奇数偶数

大大大水题。

#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int n;
char a[100];
int main()
{
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
    {
        cin>>a;
        int x=a[strlen(a)-1]%2;
        if(!x) printf("even
");
        else printf("odd
");
    }
    return 0;
}
原文地址:https://www.cnblogs.com/dfsac/p/7587852.html