Answer:
Explanation:
The following code was written in Javascript. It asks the user to enter the values for each of the variables and saves it to them. Then it uses those values to calculate the total number of pizzas needed to feed everyone at the party. Finally, it prints out the total to the screen as an alert. Both test cases were used and the outputs can be seen in the attached images below.
var slicesPerPizza = window.prompt("How many slices per pizza?");
var slicesPerPerson = window.prompt("How many slices per person?");
var totalPersons = window.prompt("How many total people will attend?");
var pizzasNeeded = Math.round((slicesPerPerson * totalPersons) / slicesPerPizza)
alert(`You need a total of ${pizzasNeeded} pizzas.`)