How do I solve this question? | SoloLearn: Learn to code for FREE!

+1

How do I solve this question?

A startup launched a smartwatch with a subpar timer. Their developers thought users would like seeing their timers in seconds. Instead, users like seeing hours, minutes, and seconds left. The company wants to hire you to fix this bad user experience. Use the timeInSeconds variable to set hours, minutes, and seconds to their correct values. For example, when timeInSeconds is 60, your code should set hours to 0, minutes to 1, and seconds to 0. Just like in every great timer app! and the default uneditable code is var timeInSeconds = 12731 var hours = 0 var minutes = 0 var seconds = 0

3/24/2020 9:22:12 AM

GARYTHEGAMER

6 Answers

New Answer

0

I tried it Lothar but it still does not work

+3

Before we can help you, you should try this task yourself by coding and link your code here.

+3

What language you wanted to use? You should also tag this in your post.

+1

Lothar I think he is talking about JavaScript.

0

Javascript or Swift

0

func secondsToHoursMinutesSeconds (seconds : Int) -> (Int, Int, Int) { return (seconds / 3600, (seconds % 3600) / 60, (seconds % 3600) % 60) } Use this function in swift