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
MakcuM [25]
3 years ago
11

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

variables to compute the total number of pizzas needed to feed all the guests and store the result in pizzasNeeded. The total may have a decimal place.
Computers and Technology
1 answer:
attashe74 [19]3 years ago
4 0

Answer:

import java.util.Scanner;

public class num6 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter number of guest");

   int totalGuest = in.nextInt();

       System.out.println("Enter number of slices per guest");

   int slicesPerGuest = in.nextInt();

       System.out.println("How many Slices are on a pizza");

   int slicesPerPizza = in.nextInt(); // Assume each pizza has 5 slices

   double pizzasNeeded;

       //Calculating the pizza Needed

    int totalslicesNeeded  = totalGuest * slicesPerGuest;

    pizzasNeeded = totalslicesNeeded/slicesPerPizza;

       System.out.println(pizzasNeeded);

   }

}

Explanation:

In this program User is required to enter values for the variables totalGuest, slicesPerGuest  and slicesPerPizza

First calculate the totalSlices needed by totalGuest * slicesPerGuest;

The calculate number of pizzas needed by totalslicesNeeded/slicesPerPizza;

You might be interested in
There is a simple method for constructing a magic square for any odd value of n:
DaniilM [7]

Answer:

See Explaination

Explanation:

class MagicSquare():

def __init__(self,side):

self.side=side

self.two_dimension=[]

for row in range(1,side+1):

row_line=[]

for col in range(1,side+1):

row_line.append(0)

self.two_dimension.append(row_line)

def display(self):

row=0

col=int((self.side-1)/2)

for i in range(1,self.side**2+1):

self.two_dimension[row][col]=i

row-=1

col+=1

if row==-1:

row=self.side-1

if col==self.side:

col=0

if self.two_dimension[row][col]==0:

continue

else:

row+=1

if row==self.side:

row==0

for line in self.two_dimension:

for num in line:

print("{0:>3}".format(num),end=" ")

print()

def main():

for i in range(1,14,2):

square=MagicSquare(i)

square.display()

print("----------------------------------------------------")

if __name__ == '__main__':

main()

3 0
3 years ago
Z-Wave and Zigbe use a _______________ networking topology to facilitate communication in homes, yet both also have hubs that ac
Nina [5.8K]

Answer: Mesh

Explanation:

Mesh network is network topology in which network nodes are directly connected with infrastructure nodes in active manner without following any hierarchy. This interconnection is made for continuous transmission of data through the network path.It can work even if any particular connection or node faces fault.

  • Z-wave commonly uses mesh topology for connecting the nodes to facilitate the home devices in wireless manner along with hub.
  • Zigbee also uses mesh topology for proving services at low cost to homes and other areas in wireless form also having router or hub as the linking device.
4 0
3 years ago
Assume the int variables i, lo, hi, and result have been declared and that lo and hi have been initialized. Write a for loop tha
IRISSAK [1]

Answer:

result=0;

for (i=lo ; i<=hi; i++){

result += i;

}

Explanation:

The question says result was declared but not initialized, so using result without initializing it to 0 would throw an error as result would be undefined and you can't add a number to undefined

Another way to do it to keep everything inside the loop would be

for (i=lo ; i<=hi; i++){

if (i==lo) result= 0;

result += i;

}

but this is impractical since it would add unnecesary operations in each cycle of the loop

4 0
3 years ago
4) To run program short cut​
quester [9]

Answer:

Run Dialog

Open it by pressing WinKey+R. In the Run dialog, type the name of a program's .exe file and press Enter to launch it.

Explanation:

Please give me brainlist and follow

6 0
3 years ago
In the information systems (IS) department, the ________ group manages the process of creating new information systems as well a
Elodia [21]

Answer:Operations

Explanation:Information system is the system that provides the knowledge about the technology and other related component working with the people.It has the function that help in the information and the communication technology.It has several function like analysis of the data, keeping record , processing etc.

The technique through which the data of the information system is managed and processed is considered in the category of the operations.Operation task manages the information that is previously stored as well as the current information.

5 0
3 years ago
Other questions:
  • If you receive an increase in pay, how will that affect your payroll deductions?
    8·1 answer
  • Which of the following best describes the 7x7 PowerPoint rule
    8·1 answer
  • When should students practice netiquette in an online course?
    9·1 answer
  • Write a program to convert a fraction to a decimal. Have your program ask for the numerator first, then the denominator. Make su
    10·1 answer
  • 20 points
    7·1 answer
  • I NEED HELP ASAP!
    6·2 answers
  • Help me guys plssssss​
    10·1 answer
  • You looked at the methods used to determine database requirements. Now, research and find a database requirements template. Choo
    9·1 answer
  • How are the functions different and how do i determine the answer
    5·1 answer
  • Choosing a per_formatted presentation that already has a design and the slots is called choosing What​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!