烟大计算机
#include <iostream>
using namespace std;
class clock
{
public:
clock(int year,int month,int day);
void timecx(int q,int w,int e);
void timeshow();
private:
int Y;
int M;
int D;
};
clock::clock(int year,int month,int day)
{
Y=year;
M=month;
D=day;
}
void clock::timecx(int q,int w,int e)
{
cin>>q>>w>>e;
if(q%400==0||(q%4==0&&q%100!=0))
{
cout<<"leap year"<<endl;
}
else cout<<"not"<<endl;
}
void clock::timeshow()
{
cout<<"xianshipanduan"<<endl;
}
int main ()
{
clock c(1,1,1);
c.timecx(2,2,2);
c.timeshow();
c.timecx(2,2,2);
c.timeshow();
return 0;
}
month,day写入是为了好看。