0 1 2 3 4 5
no no yes no no no
代码
#include <iostream> using namespace std; int main() { long n; while(cin>>n) { if(n>0&&(n-2)%4==0) cout<<"yes"<<endl; else cout<<"no"<<endl; } return 0; }
原文地址:http://blog.csdn.net/blue_skyrim/article/details/46125757