#54724: c++解答


yp11451009@yphs.tp.edu.tw (711-19王敬皓)


c++

 

#include <iostream>

using namespace std;

int main(){
    int a;//變數
    while(cin >> a){//輸入
        if((a % 4 == 0 && a % 100 != 0) || a % 400 == 0){
            cout << "閏年" << endl;//輸出
        }
        else{
            cout << "平年" << endl;//輸出
        }
    }
}