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

 

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

secondsSinceMidnight() -- This method calculates how many seconds have passed since midnight for a given current time. The current time is sent to the method in three int parameters: hours, minutes, and seconds. Assume that we are using the 24-hour clock, so that 2pm will be represented by 14 hours.


secondsSinceMidnight(0, 12, 32) → 752
secondsSinceMidnight(8, 35, 0) → 30900
secondsSinceMidnight(15, 3, 0) → 54180

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

int secondsSinceMidnight(int hours, int minutes, int seconds) { }

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: 10 Post-solution available

Copyright Nick Parlante 2017 - privacy