返回列表 發帖
本帖最後由 許馹東 於 2022-2-26 10:51 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int s = time(NULL);
  7.     cout<<"格林威治時間1970年1月1日0時0分0秒到現在,約經過"<<s<<"秒"<<endl;
  8.     int x = 60*60*24*365;
  9.     cout<<"約為"<<s/x<<"年"<<endl;
  10.     system("pause");   
  11.     return 0;
  12. }
複製代碼

TOP

返回列表