為何答案送出後告知結果為WA發生於第2行?
#include <iostream>
using namespace std;
int main()
{
int yr;
while(cin >> yr)
{
if(!(yr%400))
{
cout << "閏年" << endl;
}
else
{
if(!(yr%4)&&yr%100)
{
cout << "閏年" << endl;
}
else
{
cout << "平年" << endl;
}
}
return 0;
}
}