(Programming Exercise 11 from Chapter 2 - Leftover Pizza). You're planning a pizza party and you plan to give each person three slices of pizza. Design a program written in pseudocode that displays the number of slices that will be left over. The program should ask for the following input:

The number of pizzas you will have
The number of slices that each pizza will be cut into
The number of people that will be attending

Respuesta :

1. Start

2. Display "Enter the number of pizzas: "

3. Input number_of_pizzas

4. Display "Enter the number of slices per pizza: "

5. Input number_of_slices_per_pizza

6. Display "Enter the number of people attending the party: "

7. Input number_of_people

8. total_slices = number_of_pizzas * number_of_slices_per_pizza

9. slices_needed = number_of_people * 3

10. slices_leftover = total_slices - slices_needed

11. Display "You will have", slices_leftover, "slices of pizza leftover."

12. Stop

ACCESS MORE