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

 

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

Given an integer of how many people are at a party, return how many pizzas you should buy for the party. Let's assume that each person will eat 3 slices of pizza and that each pizza you buy has 8 slices. It's okay if there are some leftover slices, but it is not okay if every person doesn't get 3 slices!


fund_howManyPizzasToBuy(0) → 0
fund_howManyPizzasToBuy(1) → 1
fund_howManyPizzasToBuy(2) → 1

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

public int fund_howManyPizzasToBuy(int people) { }

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