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

上一篇:"struct"类型重定义解决办法


下一篇:java第五周学习