#include<iostream>
using namespace std;
struct Date
{
int year;
int mon;
int day;
};
Date input()
{
Date d;
cout<<"input the date (yyyy mm dd):";
cin>>d.year>>d.mon>>d.day;
return d;
}
int main()
{
Date d=input();
cout<<d.year<<"年"<<d.mon<<"月"<<d.day<<"日";
return 0;
}
【c++程序】输入日期
最新推荐文章于 2023-08-10 14:22:49 发布