判断某年是否是闰年问题
#include<iostream>
using namespace std;
int main()
{
int year;
cout<<"Enter the year:";
cin>>year;
bool isaleapyear;
isaleapyear=((year%4==0&&year%100!=0)||(year%400==0));
if(isaleapyear)
cout<<year<<" is a leapyear"<<endl;
else
cout<<year<<" is not a leapyear"<<endl;
return 0;
}
标签:11,isaleapyear,int,2023,year,year% From: https://www.cnblogs.com/wangxinyuan1108/p/17307550.html