#include<iostream>
using namespace std;
class Date
{
private:
int year;
int month;
int day;
public:
void Setdate();
void Showdate();
void Judgedate();};
int main()
{Date d1;
d1.Setdate();
d1.Showdate();
d1.Judgedate();
return 0;}
void Date::Setdate()
{cin>>year;
cin>>month;
cin>> day;}
void Date::Showdate()
{cout<<year<<"-"<<month<<"-"<<day<<"."<<endl;
}
void Date::Judgedate()
{int year;
if(year%400==0||(year%4==0&&year%100!=0))
cout<<year<<"是闰年"<<endl;
else
cout<<year<<"不是闰年"<<endl;
}

------------一二三四五六七八七六五四三二一
using namespace std;
class Date
{
private:
int year;
int month;
int day;
public:
void Setdate();
void Showdate();
void Judgedate();};
int main()
{Date d1;
d1.Setdate();
d1.Showdate();
d1.Judgedate();
return 0;}
void Date::Setdate()
{cin>>year;
cin>>month;
cin>> day;}
void Date::Showdate()
{cout<<year<<"-"<<month<<"-"<<day<<"."<<endl;
}
void Date::Judgedate()
{int year;
if(year%400==0||(year%4==0&&year%100!=0))
cout<<year<<"是闰年"<<endl;
else
cout<<year<<"不是闰年"<<endl;
}

------------一二三四五六七八七六五四三二一