本题只要输入的w为偶数且不为0和2即可
所以使用if语句使其可整除2即可
...
include<iostream>
using namespace std;
int main()
{
int w;
cin >> w;
if (w % 2 == 0&&w!=2&&w!=0)
{
if ((w - 2) % 2 == 0)
cout << "yes" << endl;
else
cout << "no" << endl;
}
else
cout << "no" << endl;
return 0;
}
...