about | help | code help+videos | done | prefs |
getPizzaCost
A pizza restaurant near you is having a special for a medium pie with up to 3 free toppings for $9.95. Every topping after that is an additional $2. Complete the method getPizzaCost, which takes one parameter, an int numToppings and returns the pizza cost. getPizzaCost(4) → 11.95 getPizzaCost(1) → 9.95 getPizzaCost(2) → 9.95 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100 Post-solution available
Copyright Nick Parlante 2017 - privacy