Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int a;
- int main()
- {
- while(cin>>a)
- {
- if(a%100==0&&a%400!=0)
- cout<<"平年"<<endl;
- else if(a%4==0||a%400==0)
- cout<<"閏年"<<endl;
- else
- cout<<"平年"<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement