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
They have requested a 1- to 2-page memo that describes the hospital's protections against a ransomware attack.
olganol [36]
What is the memo that they have asked of you
3 0
3 years ago
5. You were discussing software piracy with a friend and were surprised to learn how software piracy can impact your life every
hammer [34]
In class we learned not to keep but so much information on software. Your information can be hacked at any given moment. Hackers can use your information to their personal used. Do not open or respond to spam emails or pop ups saying you won anything its a scam and they can send a virus to your computer only thing they need is for you to open the email. If you have a virus backup your data then reset your whole computer the virus would be gone. Software privacy can effect your life very much just watch what you put on your computer.
5 0
3 years ago
Identify the potential impact to IT security of incorrect configuration of firewall policies and third- party VPNs
yan [13]

Answer:

why is it necessary to fight against social evils and problem

5 0
3 years ago
What would be done if you want to use these drives for separate purposes,
Bond [772]
If you mean "splitting" a single drive into several partitions, you are talking about a term called Partitioning.
7 0
3 years ago
Who is going to win the sober
Marina86 [1]

Answer:

If he want to refer to first cell or row each time a record is entered so there is a feature in excel spreadsheet named as freeze panes this will let you freeze the first cell/row or required data to be freeze at the top and can scroll up down the whole spreadsheet but that freeze data will be at top any time you want to see there is no need to scroll up. all the remaining sheet can be scroll down else than the freeze data.

I hope it will help you!

3 0
3 years ago
Other questions:
  • Assume that ip has been declared to be a pointer to int and that result has been declared to be an array of 100 elements . Assum
    7·1 answer
  • Technological developments over the past two decades, such as the rise of the internet and email, have
    11·2 answers
  • Which VMware product would allow administrators, to manage enterprise desktops with increased reliability, security, end-user ha
    11·1 answer
  • Which is a feature of a search engine? stores web pages belonging to a single website displays web pages within a browser finds
    8·1 answer
  • Design and implement an application that uses dialog boxes to obtain two integer values (one dialog box for each value) and disp
    12·1 answer
  • Which of the following is true of mobile commerce (m-commerce) applications? a. They are supported by short-range wireless commu
    9·1 answer
  • What are search tries? Why are they more efficient than usualsearching<br><br> algorithms?
    8·1 answer
  • Prime numbers can be generated by an algorithm known as the Sieve of Eratosthenes. The algorithm for this procedure is presented
    8·1 answer
  • Which of the following examples can be solved with unsupervised learning?
    8·1 answer
  • Easy<br> What is your favorite Anime<br> Mine is Attack On Titan at the moment
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!