?? lab2_4.cpp
字號(hào):
#include <iostream>
#include <cmath>
using namespace std;
struct myTime
{
short year;
short month;
short day;
short hour;
short minute;
short second;
};
void main()
{
myTime time1;
cout << "輸入現(xiàn)在的年份數(shù):";
cin >> time1.year;
cout << "輸入現(xiàn)在的月份數(shù):";
cin >> time1.month;
cout << "輸入現(xiàn)在的日期數(shù):";
cin >> time1.day;
cout << "輸入現(xiàn)在的小時(shí)數(shù):";
cin >> time1.hour;
cout << "輸入現(xiàn)在的分鐘數(shù):";
cin >> time1.minute;
cout << "輸入現(xiàn)在的秒數(shù):";
cin >> time1.second;
cout << "現(xiàn)在是" << time1.year << "年" << time1.month
<< "月" << time1.day << "日" << time1.hour << "點(diǎn)"
<< time1.minute << "分" << time1.second << "秒" << endl;
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -