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
While reviewing some web page code, you notice that the html is written in all lowercase letters. you are not sure which version
Sphinxa [80]
<span>To verify the version of HTML being run on any given page, check the DOCTYPE declaration at the head of the file. Use "inspect element" to view the page source; the DOCTYPE is generally in the header.</span>
5 0
3 years ago
What is a way to minimize techniacl problems with your computer.
Vsevolod [243]
Have you tried turning it off and back on.Try that if that does not work then try debugging it
3 0
3 years ago
Read 2 more answers
Now, my Laptop has been working since I bought it yesterday it won’t start up and it when it does it overheats and shuts off, th
tekilochka [14]

I would bring it back since it’s not working. No way would I spend hard earned money on something that doesn’t work.

Hope this helps.

7 0
3 years ago
Read 2 more answers
Which term collectively discribes hard disk ,CD,and flash drives​
mixer [17]

Answer:

The term memory collectively describes hard disk, CD and flash drive

Explanation:

4 0
3 years ago
Read 2 more answers
Social networks allow users to share vast amounts of private information about their lives. A security concern of this technolog
Lelechka [254]

Answer:

The statement is TRUE

8 0
3 years ago
Other questions:
  • Which of the following is an example of a consumer service? computer builder motorcycle manufacturer cabinet maker air condition
    15·2 answers
  • Bunch of points!!!!!!! help pls
    11·2 answers
  • What is the difference between 1080p and 2k?
    14·1 answer
  • Two or more computers that are linked together are called which of the following
    10·1 answer
  • The 2 main types of copyright relevant to the recording industry?
    5·2 answers
  • Which element in the PowerPoint application is not available in the Microsoft Word application?
    12·2 answers
  • Select the correct answer.
    5·2 answers
  • What will happen when you run this program?
    13·1 answer
  • Please tell fast plzzzzzz​
    5·2 answers
  • Which of the following is the file type of Microsoft® Publisher files?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!