#include<bits/stdc++.h>
using namespace std;
void Is_R(int y){
if((y%400==0)||(y%4==0&&y%100!=0)){
cout<<"yes";
}
else{
cout<<"no";
}
}
int main(){
int year;//输入年份
cin>>year;
Is_R(year);
return 0;
}
闰年判断(蓝桥杯基础练习)
阅读 46
2022-01-26
#include<bits/stdc++.h>
using namespace std;
void Is_R(int y){
if((y%400==0)||(y%4==0&&y%100!=0)){
cout<<"yes";
}
else{
cout<<"no";
}
}
int main(){
int year;//输入年份
cin>>year;
Is_R(year);
return 0;
}
相关推荐
精彩评论(0)