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

 

eggsLeft


Define a function that when passed two integers, the first representing the total number of eggs, and the second representing the size of tray (number of eggs that can fit in one tray), returns the number of eggs left behind after all possible trays have been filled (completely).


eggsLeft(1000, 50) → 0
eggsLeft(80, 20) → 0
eggsLeft(80, 30) → 20

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

int eggsLeft(int nEggs, int traySize) { }

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

Copyright Nick Parlante 2017 - privacy