Answers for "c++ hours minutes seconds"

C++
0

c++ hours minutes seconds

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.";
Posted by: Guest on July-15-2020

Code answers related to "c++ hours minutes seconds"

Browse Popular Code Answers by Language