非正规题解 | Watermelon
2024-07-31 21:23:35
发布于:浙江
38阅读
0回复
0点赞
对于这一道题呢,我个人理解完全可以通过函数来解决这个问题
正确答案
#include <iostream>
using namespace std;
bool daan(int n){
if(n % 2 != 0 || n == 2)
return false;
else
return true;
}
int main(){
int n;
cin >> n;
if(daan(n))
cout << "YES";
else
cout << "NO";
return 0;
}
步骤讲解
第一步,我们需要先把我们万能的基本框架打好。
如下:
#include <iostream>
using namespace std;
int main(){
return 0;
}
根据题目我们可以知道
全部评论 1
万能是:
#include<bits/stdc++.h> using namespac std; int main(){ return 0; }
2024-11-02 来自 江苏
1
有帮助,赞一个