题解 | #判断整数奇偶性#
判断整数奇偶性
https://www.nowcoder.com/practice/a8b018667e274af29b5f76a6673450fc
#include<iostream>
using namespace std;
int main() {
int a;
while (cin >> a) {
if (a % 2 == 0)
cout << "Even" << endl;
else
cout << "Odd" << endl;
}
return 0;
}
查看5道真题和解析