程序设计实验\实验二 选择与分支
闰年
#include<iostream>
using namespace std;
int main()
{
int year;
bool leap;
cin>>year;
if(year%4==0)
{if(year%100==0)
{if(year%400==0)
leap=true;
else
leap=false;
}
else
leap=true;
}
else
leap=false;
if(leap)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
}