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]
3 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]3 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
To rehearse giving a PowerPoint presentation, Hema would like to print out the presentation with all of the speaker notes. Hema
seraphim [82]

From the given case in the question, Hema would prefer having a handout document for the audience that does not include the slide dates, which are included in her printed notes for the presentation.

To do this, Hema would need to execute option (D) View → Notes and Handouts → Header & Footer → Date and time → Fixed.

This is because the option to modify dates for handouts and notes are in the View tab, not on the insert Tab.

8 0
4 years ago
If you want to create programs with more detailed images, maybe even characters that you could interact with, what pieces of inf
Oliga [24]

The pieces of information needed in the code to create a more detailed program are the sprite objects

<h3>What are sprites?</h3>

Sprites are program objects that are used in a program to add more features such as detailed images, characters and animations in the program.

The sprite objects are dragged and dropped on the program

Hence, the pieces of information needed are the sprite objects

Read more about object-oriented program at:

brainly.com/question/25649719

6 0
2 years ago
In every programming language, when you access data stored in an array, you must use a ____ containing a value that accesses mem
Juli2301 [7.4K]

Answer: this app allow  u to have answers made for students 5 star ap but there are some ads that get  in the way

Explanation:

but it is good

7 0
3 years ago
Which type of game controller has a set of controls for each hand?
svet-max [94.6K]
If you play the Wii, they have the controller and then they have a nunchuck that connects to the other controller, and you use that with your other hand. Hope that helps :)
6 0
3 years ago
The directory "a" contains its subdirectory "b" and there is no other entry in the directory "a". You want to display "the conte
Svet_ta [14]

The answer assumes that the question is about which command help accomplish display directory contents in Unix-like operating systems.

Answer:

The command is <em>ls</em>.

Explanation:

The command <em>ls</em> (short for <em>list</em>) displays a variety of important information in different ways regarding any directory contents. Because of this, it is probably one of the most used commands in Unix-like operating systems.

Any directory can contain directories and files of different sizes, recently created/modified, attributes like permissions for being accessed, and, with this command, we can see all this information by size, chronologically, by owner, and/or by many more ways.  

In the question, we can accomplish to list that the directory "a" contains its sub-directory "b" and no other entry using the next line of code:

Command-line 1: \\ ls\; a (<em>the command "says": display content of a</em>)

Result: b

The result is only the directory <em>b </em>because there is no other entry in it.

To display more information regarding <em>b</em>, we can use the many options available for the command <em>ls</em>, like <em>-a</em> (all entries), <em>-d</em> (only directories), <em>-l</em> (long listing format), and so on, e.g. ls -a  A (display all entries in directory A, included hidden files).

6 0
3 years ago
Other questions:
  • Why is internet safety important
    14·2 answers
  • To give text an outline, you can use which command?
    15·1 answer
  • You open a link in a new tab by holding the _______ button while clicking the link
    8·1 answer
  • Consider having three String variables a, b, and c. The statement c = a + b; also can be achieved by saying_____________.a. c =
    11·1 answer
  • What is the difference between a technological problem and a technological opportunity? Explain with an example.
    7·2 answers
  • A type of VPN connection, where a single computer logs into a remote network and becomes, for all intents and purposes, a member
    13·1 answer
  • Questione
    6·1 answer
  • John buy cheap stolen rims for his new truck?
    11·1 answer
  • Select the correct answer from each drop-down menu.
    8·1 answer
  • How to do or create a shepard tone using additive synthesis in Pure Data. Please help, desperate!!
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!