문제
설명
x가 홀수인지 짝수인지 결정하는 것은 간단한 문제입니다.
(이 문제는 0이 짝수라는 것을 보여줍니다.
)
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
while (n--) {
int x;
cin >> x;
if (x % 2 == 0) cout << x << " is even\n";
else cout << x << " is odd\n";
}
return 0;
}