#include<iostream> using namespace std; int main() { int year; cout<<"输入年份:"<<endl; cin>>year; if (year%4==0&&year%100!=0||year%400==0) cout<<"y"<<endl; else cout<<"n"<<endl; return 0; }
这个明天要学透!!
时间: 2024-10-24 10:12:59
#include<iostream> using namespace std; int main() { int year; cout<<"输入年份:"<<endl; cin>>year; if (year%4==0&&year%100!=0||year%400==0) cout<<"y"<<endl; else cout<<"n"<<endl; return 0; }
这个明天要学透!!