id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

lenpelletier@gmail.com math > calculateTime
prev  |  next  |  chance

calculateTime() -- Given a number of seconds that have elapsed since midnight, return a String which represents the current time in the format: "HH:MM:SS". Represent hours using 24 hour time.


calculateTime(3600) → "1:0:0"
calculateTime(60) → "0:1:0"
calculateTime(1) → "0:0:1"

...Save, Compile, Run (ctrl-enter)

public String calculateTime(int sec) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 20 Post-solution available

Copyright Nick Parlante 2017 - privacy