Question: Please help me answer problem 2 . Thank you! If you split al 1 this pizza evenly among 1 2 people, you will have 4
Please help me answer problem Thank you!
If you split al this pizza evenly among people,
you will have slices left over.
Mmmm Cold pizza...
$ java PizzasAndPeope
how many pizzas?
how many slices per pizza?
how many people?
If you split al this pizza evenly among people, y
ou wil have slices left over.
Mmmm Cold pizza... Problem
This problem is very similar to Problem and you can use your solution to Problem as starter code.
The inputs are the same, but the output is a bit different: rather than telling the user how many slices in total will be left after you give each person
their slices, display the number of whole pizzas that can be assembled from what is left, plus the number of slices that don't add up to a whole pie.
Sample Runs:
$ java PizzasForThePeople
how many pizzas?
how many slices per pizza?
how many peope
If you split al this pizza evenly among people,
you will have whole pizzas and slices left over.
Mmmm Cold pizza...
$ java PizzasForThePeople
how many pizzas?
how many slices per pizza?
how many peope
If you spit a this pizza evenly among people,
you wil have whole pizzas and slices left over.
Mmmm Cold pizza...
$ java PizzasForThePeople
how many pizzas?
how many slices per pizza?
how many people?
If you split all this pizza evenly among people, y
ou will have whole pizzas and slices left over.
Mmmm Cold pizza...
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
