📜  c++ 时分秒 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:51.902000             🧑  作者: Mango

代码示例1
int seconds, hours, minutes;
cin >> seconds;
minutes = seconds / 60;
hours = minutes / 60;
cout << seconds << " seconds is equivalent to " << int(hours) << " hours " << int(minutes%60) 
     << " minutes " << int(seconds%60) << " seconds.";