其他分享
首页 > 其他分享> > Leap year

Leap year

作者:互联网

Leap year is defined as a year that divisible by 400 or not divisible by 100 but divisible by 4.

#include <iostream>using namespace std;


int main(){ int y; cin>>y; if((y%4==0&&y%100!=0)||y%400==0) cout<<"yes"<<endl; else cout<<"no"<<endl; return 0; }

:D

标签:divisible,year,y%,int,Leap,400
来源: https://www.cnblogs.com/lym11248/p/12814149.html