奇偶判断

code

#include<iostream>
#include<cstdio>
using namespace std;
int main() {
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	if (n & 1) {
		printf("odd");
		//cout<<"odd";
	} else {
		printf("even");
		//cout<<"even";
	}
	return 0;
}

compare


上为printf

posted @ 2022-02-09 09:49  ggexs  阅读(28)  评论(0)    收藏  举报