#include <stdio.h> // #define uint unsigned int // // typedef // unsigned int // uint_t; unsigned int get(unsigned int x, int i); int main(int argc, char *argv[]) { unsigned int x; scanf("%u", &x); // The least significant bit tells the parity of x if(get(x, 0) == 1) { printf("odd\n"); } else { printf("even\n"); } return 0; } unsigned int get(unsigned int x, int i) { unsigned int m = 1 << i; if((x & m)) { // there is a one here return 1; } else { // there is 0 here return 0; } }