另一种方法
2024-12-03 13:06:21
发布于:北京
3阅读
0回复
0点赞
这样也行,建议试试:
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
cout<<(n % 2 == 0 ? "even" : "odd")<<"\n";
return 0;
}
这里空空如也
2024-12-03 13:06:21
发布于:北京
这样也行,建议试试:
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
cout<<(n % 2 == 0 ? "even" : "odd")<<"\n";
return 0;
}
这里空空如也
提交答案之后,这里将显示提交结果~
有帮助,赞一个