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

 

jebbert@volusia.k12.fl.us > foodLeftovers
prev  |  next  |  chance

Determine how many left-overs are left after dinner. The parameter 'amountMade' indicates how much food was made. The parameter 'amountUsed' indicates how much food was used. If more food was made than was used, there will be left-overs. The left-overs will be the difference between the amount made and the amount used. Otherwise, there will be no left-overs.


foodLeftovers(428, 100) → 328
foodLeftovers(500, 600) → 0
foodLeftovers(240, 230) → 10

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

public int foodLeftovers(int amountMade, int amountUsed) { }

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: 210

Copyright Nick Parlante 2017 - privacy