Run ID:49425

提交时间:2023-07-04 01:09:49

#include<iostream> using namespace std; bool isLeapYear(int year){ if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) { return true; } else { return false; } } int main() { int year; cin >> year; if (isLeapYear(year)) { cout << "leap year" << endl; } else { cout << "not leap year" << endl; } return 0; }