0
点赞
收藏
分享

微信扫一扫

闰年判断(蓝桥杯基础练习)

读思意行 2022-01-26 阅读 46
蓝桥杯c++
#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 条评论