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
Which of the following software program provides for email communication
olga2289 [7]
If "Outlook" is one of the options then thats the answer.
6 0
3 years ago
Read 2 more answers
_____ refers to unsolicited commercial emails, usually sent to a large number of people with little regard to the users interest
frozen [14]
Spam refers to large unsolicited email irregardless of the recipients views on the matter
5 0
3 years ago
How an operating system allocates system resources in a computer​
Whitepunk [10]

Answer:

The Operating System allocates resources when a program need them. When the program terminates, the resources are de-allocated, and allocated to other programs that need them

8 0
3 years ago
Write a statement that compares the values of score1 and score2 and takes the following actions. When score1 exceeds score2, the
vaieri [72.5K]

Answer:

player1Wins = player1Losses = player2Wins = player2Losses = tieCount = 0

score1 = 10

score2 = 10

if score1>score2:

   player1Wins=player1Wins+1

   player2Losses=player2Losses+1

   print("player1 wins")

elif score2>score1:

   player2Wins=player2Wins+1

   player1Losses=player1Losses+1

   print("player2 wins")

else:

   tieCount=tieCount+1

   print("tie")

Explanation:

Since your indentation can not be understand what you give us, please try to do it as you see in the answer part.

Although it seems that this is a part of the code, it is normal that you get errors. However, since you keep track of the variables, it is better to initialize the variables that will keep the counts. Since initially, they are 0, you may set them as 0. Also, if you assign the values to the scores, probably you would not get any error. This way, you may test your code as I did.

Other than these, in the else part you do not need to write "score1=score2", because if score1 is not greater than score2 and if score2 is not greater than score1, this already implies that they are equal

8 0
3 years ago
2. What is software conflict?<br>​
Morgarella [4.7K]

Answer:

A problem that occurs when two programs cannot run in the same computer at the same time. It is generally due to a programming bug and typically manifests when two programs compete for the same resource (memory, peripheral device, register, etc.).

Hope it helps out!

Explanation:

3 0
2 years ago
Other questions:
  • The project started the development of inter-network connections using tcp/ip that has evolved into the internet today.
    5·1 answer
  • Located toward the right of the status bar and contains buttons for zooming the display in and out
    13·1 answer
  • Sending a employee an email with important criticism represents a problem which communication process
    9·1 answer
  • The lightbulb transfers electricity energy into light what is one type of energy that is also generated that is not a desired af
    14·1 answer
  • What is a credit card balance? A...The amount of interest you must pay the credit card company B...The required minimum payment
    15·1 answer
  • What symbol indicates that material has been copyrighted?
    8·2 answers
  • A device that filters data traffic at a network boundary​
    14·1 answer
  • Differentiate between patent and copyright.
    6·2 answers
  • Examples of how the development of coding changed the way we live. What type of technology was created as a result of code?
    10·1 answer
  • Game Design!
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!