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

 

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

percentageOfDay() -- given the number of hours, minutes, and seconds that have passed since midnight, return the percentage of the day that has passed. Return this percentage as an integer rounded down.


percentageOfDay(1, 0, 0) → 4
percentageOfDay(12, 0, 0) → 50
percentageOfDay(24, 0, 0) → 100

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

int percentageOfDay(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