#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;
}
微信扫一扫
#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;
}
相关推荐