CodePudding user response:
#include
Using the name space STD.
#include
The class date {
Private:
Int year;
Int the month;
The int data;
Public:
Void cin1;
Void cout1;
Void cout2;
Void cout3;
String fun (int a);
}
Void date: : cin1 () {
cout<" Please enter the year month day: "& lt; cin> Year> Month> Year;
If (data> 31 | | data1)
{cout<" Does not conform to that date, please input again "& lt; If (month> 12 | | month<1)
{cout<" Does not conform to that date, please input again "& lt; }
Void date: : cout1 () {
cout }
Void date: : cout2 () {
cout}
Void date: : cout3 () {
cout}
{string date: : eq (int a)
{switch (a)
Case1: return January;
Case2: return February;
Case3: return March;
Case4: return (research;
Case5: return May;
Case6: return June;
Case7: return out;
Case8: return August;
Case9: return September;
Case10: return October;
Case11: return another awarding;
Case12: return November;
}
}
Int main ()
{
The date box;
Box. Cin1 ();
Box. Cout1 ();
Box. Cout2 ();
Box. Cout3 ();
return 0;
} CodePudding user response: