Question: 1. Design a C++ program to convert seconds to a concise representation way: x hours y minutes z seconds. Input an integer that represents a
1. Design a C++ program to convert seconds to a concise representation way: x hours y minutes z seconds. Input an integer that represents a length of time in seconds. The program should then output the number of hours, minutes, and seconds that corresponds to that number of seconds. For example, if the user inputs 50391 total seconds, then the program should output 13 hours, 59 minutes, and 51 seconds. (13*3600+59*60+51 = 50391) Hint: you might consider modulus (%) operator to solve the problem.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
