题解 | #判断整数奇偶性#
判断整数奇偶性
http://www.nowcoder.com/practice/a8b018667e274af29b5f76a6673450fc
#include <stdio.h> int main() { int input=0; int a = 0,b=0; while(scanf("%d",&input)!=EOF) { a = input % 10; b = a % 2; if (b == 0) printf("Even\n", input); else printf("Odd\n", input);
}
return 0;
}