返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {   
  6.    int t;
  7.    cout<<"請輸入想換算的秒數:";
  8.    cin>>t;
  9.    cout<<t/(60*60)<<"時";
  10.    t%=60*60;
  11.     cout<<t<<"秒換算為"<<endl;
  12.    cout<<t/60<<"分"<<endl;
  13.    t=t%60;
  14.    cout<<t<<"秒"<<endl;
  15.   system("pause");
  16.      return 0;
  17.             
  18. }
複製代碼

TOP

返回列表