if((year%4==0 && year%100!=0)||year%400==0){
cout<<year<<"年是闰年"<<endl;
}else{
cout<<year<<"年是平年"<<endl;
}
润年:1)被4整除且不能被100整除的为闰年,2)能被400整除的是闰年
最新推荐文章于 2024-08-27 14:44:27 发布
if((year%4==0 && year%100!=0)||year%400==0){
cout<<year<<"年是闰年"<<endl;
}else{
cout<<year<<"年是平年"<<endl;
}