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
dimulka [17.4K]
2 years ago
15

For this assignment, you will write a program that calculates gross and net revenue for a movie theater. Consider the following

scenario: A movie theater keeps 75% of the revenue from ticket sales. The other 25% goes to distributors. Write a program that calculates the theater’s gross and net box office revenue for a night.The program should ask for the name of the movie, the prices for adult and child tickets, and how many adult and child tickets were sold. Be sure to include comments throughout your code where appropriate. The report should be formatted as follows: Movie Name: "Wheels of Fury" Adult Ticket Price: $10 Child Ticket Price: $7 Adult Tickets Sold: 300 Child Tickets Sold: 140 Gross Box Office Revenue: $3980.00 Amount Paid to Distributor: -$995.00 Net Box Office Revenue: $2985.00 Complete the C++ code using Visual Studio
Computers and Technology
1 answer:
Marrrta [24]2 years ago
6 0

Answer:

// This program is written in C++

// Comments are used for explanatory purpose

#include<iostream>

using namespace std;

int main()

{

// Declare variables

int childticket, adultticket, childprice, adultprice;

double total, net, distributor;

string movie;

// Prompt user for name of movie

cout<<"Movie Name; ";

// Accept input for movie name

cin>>movie;

// Prompt user and accept input for price of adult tickets

cout<<"Adult Ticket Price: $";

cin>>adultprice;

// Prompt user and accept input for price of child tickets

cout<<"Child Ticket Price: $";

cin>>childprice;

// Prompt user and accept input for number of sold adult tickets

cout<<"Adult Ticket Sold: ";

cin>>adultticket;

// Prompt user and accept input for number of child tickets sold

cout<<"Child Ticket Sold: ";

cin>>childticket;

// Calculate total

total = childticket * childprice + adultticket * adultprice;

// Calculate distributor's payment

distributor = 0.25 * total;

// Calculate net box pay

net = 0.75 * total;

// Display and format results

cout<<"Gross Box Office Revenue: $";

printf("%.2f",total);

cout<<"\n Amount Paid to Distributor: -$";

printf("%.2f", distributor);

cout<<"\nNet Box Office Revenue: $";

printf("%.2f",net);

return 0;

}

You might be interested in
On a printed circuit board, electronic components will be mounted from the
Likurg_2 [28]
On a printed circuit board, electronic parts will be mounted from the substrate side of the board. The leads jab through the substrate and the copper sheeting that has been carved. The leads are then soldered to the copper.

I hope the answer will help you. 
3 0
3 years ago
Select the correct category of cybersecurity described.
Shalnov [3]

Answer:

Network security

Explanation:

Network security is a category of cybersecurity that is related to the protection of the infrastructure of the computer network from unauthorized access and intrusion that may be from intended attack or from an expedient  program which may result in the modification, malfunctioning, misuse or unacceptable disclosure of the network and the contents of the network

The category of cybersecurity that 'prevents intruders from accessing, misusing, destroying, adapting, or improperly disclosing networks, network infrastructure, or the information contained within networks' is network security.

6 0
2 years ago
System software usually refers to what kind of software?​
kodGreya [7K]
Operating systems and web servers
8 0
3 years ago
An electronic tool that allows information to be input processed and output? A, operating system B.motherboard C.cpu D.computer
kherson [118]

Answer:

This would be considered a CPU in that case.

Explanation:

A CPU does basic arithmetic, logic, controlling, input AND the output. It would be stated in the program's instructions.

7 0
2 years ago
Suppose two computers (A &amp; B) are directly connected through Ethernet cable. A is sending data to B, Sketch the waveform pro
ICE Princess25 [194]

Answer:

Physical / Data link layer

Explanation:

If two computers (A & B) are directly connected through Ethernet cable. A is sending data to B, the data would be transmitted if the network is clear but if the network is not clear, the transmission would wait until the network is clear.

The Open Systems Interconnection model (OSI model) has seven layers each with its own function.

The physical layer is the first layer responsible for data transmission over a physical link. The data packets are converted to signals over a transmission media like ethernet cable.

The data link layer is the second layer in the OSI layer responsible for transmission of data packets between nodes in a network. It also provides a way of detecting errors and correcting this errors produced as a result of data transmission.

4 0
3 years ago
Other questions:
  • Elise has just edited two photos of her cat and three different photos of her dog. She needs to save all five of these photos in
    5·2 answers
  • All but one of the following statements about stored procedures is true. Which one is false? a. They consist of one or more SQL
    10·1 answer
  • PLEASE HELP!!!!
    7·1 answer
  • Which of these programmers creates the core game engine?
    5·2 answers
  • Along a road lies a odd number of stones placed at intervals of 10 metres. These stones have to be assembled around the middle s
    12·1 answer
  • Which program will have the output shown below?
    7·1 answer
  • Which factor is NOT used to determine who can be let go during a downsizing?
    8·2 answers
  • What is a photographic print made from a negative image?
    7·1 answer
  • Ok i dont wanna get bannddddddd so i have to ask a qustion<br> 2 plus 2
    8·2 answers
  • A type of attack where the adversary intercepts network packets, modifies them, and inserts them back into the network is called
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!