Pages

Monday, July 25, 2011

a004: 文文的求婚


#include
using namespace std;

int main()
{
int year;
while( cin >> year )
{
if( ( year % 4 == 0 && year % 100 != 0 ) || (year % 400 == 0) )
cout << "閏年\n";
else
cout << "平年\n";
}
return 0;
}

No comments:

Post a Comment