Computer Science Question

Write a program that allows the user to input a whole number of seconds and
converts this to hours, minutes, and seconds as suggested by the examples
below. Care should be paid to plural versus singular and if an item occurs 0
times, it shouldn’t be printed at all.
Examples:
Input: 12876 Output: 3 hours 34 minutes 36 seconds
Input: 7210 Output: 2 hours 10 seconds
Input; 7261 Output: 2 hours 1 minute 1 second

Sample Solution