基础练习 闰年判断

闰年判断

#include<iostream>
using namespace std;
int main(){
	int y;
	cin>>y;
	if((y%400==0)||(y%4==0&&y%100!=0))
		cout<<"yes"<<endl;
	else
		cout<<"no"<<endl;
	return 0;
}
posted @ 2019-01-28 12:32  A-Little-Nut  阅读(203)  评论(0编辑  收藏  举报