#include<iostream>
using namespace std;
int main(void){
int year;
bool i;
cout<<"输入年份:";
cin>>year;
i = ((year%4==0 && year%100!=0)||(year%400==0));
if(i)
cout<<year<<"是闰年"<<endl;
else
cout<<year<<"是平年"<<endl;
return 0;
}
初学者的我已会最简单的闰年平年代码
最新推荐文章于 2023-04-28 22:53:26 发布