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

 

norm.krumpe@muohio.edu methodslab1 > libraryFine
prev  |  next  |  chance

Given the number of days a library book is late, return the fine for that book. The library charges 50 cents for the first day a book is late, plus 10 cents for each additional day. If the number of days late is less than 1, the fine is 0 cents.


libraryFine(1) → 50
libraryFine(2) → 60
libraryFine(5) → 90

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

int libraryFine(int days) { }

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

Copyright Nick Parlante 2017 - privacy