⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lab2_4.cpp

📁 简单的数据处理
💻 CPP
字号:
#include <iostream>
using namespace std;
struct time
{ int year;
  int month;
  int date;
  int hour;
  int min;
  int second;
};
void main()
{ time guy;
  cout<<"年份:";
  cin>>guy.year;
  cout<<"月份:";
  cin>>guy.month;
  cout<<"日:";
  cin>>guy.date;
  cout<<"小时:";
  cin>>guy.hour;
  cout<<"分钟:";
  cin>>guy.min;
  cout<<"秒:";
  cin>>guy.second;
  cout<<"The guy's time is:"<<endl;
  cout<<"年份:"<<guy.year<<endl;
  cout<<"月份:"<<guy.month<<endl;
  cout<<"日:"<<guy.date<<endl;
  cout<<"小时:"<<guy.hour<<endl;
  cout<<"分钟:"<<guy.min<<endl;
  cout<<"秒:"<<guy.second<<endl;
 
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -