如题所述
#include<iostream.h>
void main()
{
int year;
cout<<"请输入2000~2500年中任一年份year=";
cin>>year;
if(year%4==0&&year%100!=0||year%400==0)
cout<<year<<"年是闰年."<<endl;
else
cout<<year<<"不年是闰年."<<endl;
}
void main()
{
int year;
cout<<"请输入2000~2500年中任一年份year=";
cin>>year;
if(year%4==0&&year%100!=0||year%400==0)
cout<<year<<"年是闰年."<<endl;
else
cout<<year<<"不年是闰年."<<endl;
}
温馨提示:答案为网友推荐,仅供参考
第1个回答 2010-11-15
bu
参考资料:fcfd