Question: Problem 1. Write a program to convert Seconds in to Hours Minutes and Seconds. You should obtain number of seconds as user input (Integer
Problem 1. Write a program to convert Seconds in to Hours Minutes and Seconds. You should obtain number of seconds as user input (Integer Value). Convert the seconds obtain in to Hours, Minutes and Seconds and Display that to the User. For an Example Enter a number of seconds: 500 Here is the time in hours, minutes, and seconds: Hours: 0.0 Minutes: 8.0 Seconds: 20.0 Here the user enters 500 seconds, 500 seconds is same as 8 minutes and 20 seconds. Below the user enter 36000 seconds which is equal to 10 hrs and 0 minutes and 0 seconds Enter a number of seconds: 36000 Here is the time in hours, minutes, and seconds: Hours: 10.0 Minutes: 0.0 Seconds: 0.0 60 sec = 1 Minute 60 min = 1 Hour So 1 Hour = 3600 Seconds Hint: Use Floor division and Modulus Operator
Step by Step Solution
3.39 Rating (152 Votes )
There are 3 Steps involved in it
Codepy seconds Output Minutes 00 Secon... View full answer
Get step-by-step solutions from verified subject matter experts
