题目描述
群众想要吃瓜,于是给你一个瓜让你切,但是作为考验
告诉你西瓜的重量,问你能否将这个西瓜分成两部分,每个部分都是偶数。
输入描述:
输入一行,包含一个整数weight,表示西瓜的重量1 <= weight <= 100
输出描述:
输出一行,见样例。
示例1
输入
8
输出
YES, you can divide the watermelon into two even parts.
示例2
输入
3
输出
NO, you can’t divide the watermelon into two even parts.
备注:
要注意检查你的输出格式要跟样例输出一模一样才能通过,尤其别忘了句子最后的小点哦
#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
int main()
{
int weight;
cin>>weight;
if(weight%2==0&&weight!=2)
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;
}