闰年

#include<iostream>
#include<string>


using namespace std;


string jud(int year);


int main(int argc,char** argv){

int year;
cin >> year;

cout << jud(year);
return 0;
}


string jud(int year){

if(year % 400 == 0){

return "yes";

}else{

if(year % 4 == 0){

if(year % 100 != 0){

return "yes";

}else{

return "no";
}

}else{

return "no";
}
}
}
原文地址:https://www.cnblogs.com/viplanyue/p/12700717.html