考虑全面,平分为偶数,2不行
#include<iostream>
using namespace std;
int main()
{
int a;
cin>>a;
if(a!=2&&a%2==0)
cout<<"YES, you can divide the watermelon into two even parts."<<endl;
else
cout<<"NO, you can't divide the watermelon into two even parts."<<endl;
return 0;
}
a
using namespace std;
int main()
{
int a;
cin>>a;
if(a!=2&&a%2==0)
cout<<"YES, you can divide the watermelon into two even parts."<<endl;
else
cout<<"NO, you can't divide the watermelon into two even parts."<<endl;
return 0;
}
a
全部评论
相关推荐
07-17 16:26
安徽师范大学 嵌入式软件开发 点赞 评论 收藏
分享