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

 

tmhscs@gmail.com fundamentals > fund_howManySmoothies
prev  |  next  |  chance

A smoothie restaurant is selling strawberry and banana smoothies.
To make a strawberry smoothie, they need 1 cup of milk and 4 strawberries.
To make a banana smoothie, they need 1 cup of milk and 1 banana.

Given integers of how many cups of milk they have, how many strawberries they have, and how many bananas they have, what is the total number of smoothies that they can make of any type?


fund_howManySmoothies(1, 0, 1) → 1
fund_howManySmoothies(1, 4, 0) → 1
fund_howManySmoothies(2, 1, 1) → 1

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

public int fund_howManySmoothies(int cupsOfMilk, int strawberries, int bananas) { }

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

Post-solution available

Copyright Nick Parlante 2017 - privacy