Question: Apply the modulus operator in the following situation: You are hosting a party and you order 11 pizzas. Each pizza has 12 slices, and

Apply the modulus operator in the following situation: You are hosting a party and you order 11 pizzas. Each pizza has 12 slices, and the average person eats 3 slices, and you expect 21 people at the party. How many pizza's will be completely consumed and how many extra slices will be needed to feed the expected number of guests? What does the formula look like if you write it in the C language? Fill-in the missing parts (underscored): int totalSlices = 11 * 12; int estimatedSlices Consumed = 21 * 3; int wholePizzasEaten = int extraSlices Needed = 3 Briefly explain why it is often a best practice to convert floating-point values to integers when performing arithmetic operations?
Step by Step Solution
3.57 Rating (164 Votes )
There are 3 Steps involved in it
Step 1 here The equation to decide the quantity of entire pizzas ate can be determined utilizing num... View full answer
Get step-by-step solutions from verified subject matter experts
