Advertisement
gha890826

a004. 文文的求婚

Apr 29th, 2021
646
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int a;
  5.  
  6. int main()
  7. {
  8.     while(cin>>a)
  9.         {
  10.             if(a%100==0&&a%400!=0)
  11.                 cout<<"平年"<<endl;
  12.             else if(a%4==0||a%400==0)
  13.                 cout<<"閏年"<<endl;
  14.             else
  15.                 cout<<"平年"<<endl;
  16.         }
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement