1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alborosie
3 years ago
12

To plan a pizza party, one may want to order enough pizza for everyone. Use the slicesInPizza, slicesPerPerson, and totalGuests

variables to compute the total number of pizzas needed to feed all the guests and store the result in totalPizzas. The total may have a decimal place.
1 var slicesInPizza = 8; // Code tested with values: 8 and 12
2 var slices PerPerson = 4; // Code tested with values: 4 and 5
3 var totalI Persons = 12; // Code tested with values: 12 and 10
4
5 var pizzasNeeded = 0;
Computers and Technology
1 answer:
zheka24 [161]3 years ago
6 0

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.`)

You might be interested in
A transmission system at a radio station uses a/an _______ to convert a direct current into a high-frequency alternating current
xenn [34]
The answer is A. oscillator 
5 0
3 years ago
The ___ provide(s) shortcuts to commonly used elements
Genrish500 [490]

The quick access toolbar provides shortcuts to commonly used elements.

The Home Tab brings you to the home page and the File Tab allows you to save the file or print it.

I hope this helps! :)

7 0
3 years ago
Read 2 more answers
A variable like user_num can store a value like an integer. Extend the given program as indicated. Output the user's input. (2 p
lapo4ka [179]

Answer:

The answer to this question is given below in the explanation section. It is noted that this program is written in C++ using online C++ compiler.

Explanation:

#include <iostream>

using namespace std;

int squared(int num)// this is the function to compute square

   {

       return num*num;

   }

int cube(int num)// this is the function to compute cube

   {

       return num*num*num;

   }

int main()

{

   int user_num, user_num2; // variable declaration

   

       cout<<"Enter the first number: ";//prompt user to enter the number

       cin>>user_num;//store the user entered number into variable

       cout<<"\nEnter the second number: ";//prompt the user to enter the second number

       cin>>user_num2;//store the user entered number into variable

   

   

   cout<<"\nSquared of first number is: "<<squared(user_num);//compute square of user_num and display

   cout<<"\nCube of first number is: "<<cube(user_num);//compute the cube of the user_num and display

   cout<<"\nSquare of second number is: "<<squared(user_num2);//compute the square of user_num2 and display

   cout<<"\nCube of second number is: "<<cube(user_num2);//compute the cube of user_num2 and display

   

   cout<<"\nSum of number 1 and number 2 is: "<<user_num2 + user_num2;//display the sum of user_num2 and user_num

   cout<<"\nProduct of number 1 and number 2 is: "<<user_num2 * user_num;//display the product of user_num and user_num2

   

   

   return 0;//terminate the program

}

                               

7 0
3 years ago
Write an application that reads an English-language phrase and encodes it into Morse code. Also write an application that reads
Morgarella [4.7K]

Answer: English to Morse code. Hello my name is Isabella:   .... . .-.. .-.. --- / -- -.-- / -. .- -- . / .. ... / .. ... .- -... . .-.. .-.. .-

Morse code to English: .. / .-.. .. -.- . / -- .- - ....  is I like math

6 0
3 years ago
Where do i put a vcard file on an android phone?
Andrews [41]
You can keep it in any folder.
just put the vcf in a folder.
4 0
3 years ago
Other questions:
  • Write a program that accepts as input the mass, in grams, and density, in grams per cubic centimeters, and outputs the volume of
    14·1 answer
  • Regarding the Internet of Things (IoT), a business involved in utilities, critical infrastructure, or environmental services can
    10·1 answer
  • In an airline reservation system, on entering the flight number, the flight schedule and the flight status are displayed. In thi
    13·2 answers
  • To see all of the records at once, you should use _______ view. 
    12·2 answers
  • Which hardware device connects your network to the internet? select one:
    15·1 answer
  • Which of these statements about tags is false?
    12·1 answer
  • 41. All the following software are examples of operating systems EXCEPT
    5·1 answer
  • What number will be output by the console.log command on line 5?
    9·1 answer
  • 45 points!!
    15·2 answers
  • 5. Nadia wants to calculate the total interest, which is the total amount of the payments minus the loan amount. In cell F6, ent
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!