題目描述
羣衆想要吃瓜,於是給你一個瓜讓你切,但是作爲考驗
告訴你西瓜的重量,問你能否將這個西瓜分成兩部分,每個部分都是偶數。
輸入描述:
輸入一行,包含一個整數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;
}