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
madreJ [45]
3 years ago
11

You need to write a program that calculates and displays the revenue earned from ticket sales at a movie theater. Input: Prompt

the user for the number of adult tickets. Prompt the user for the number of child tickets. Process: Perform the calculations. The adult tickets cost $10.00 and the child tickets cost $6.00. The theater keeps 20% of the gross box office profit, and the rest goes to the movie distributor. Output: Display the results.
Computers and Technology
1 answer:
KonstantinChe [14]3 years ago
8 0

We first import the header file for input output using include.

#include <iostream>

Next, we import the namespace for input output.

using namespace std;

We first declare and initialize variables for all the information that needs to be stored and displayed.

We take float data type since revenues earned by theater and distributor are shown as a percentage of the total sales made.

float adultFee = 10, childFee = 6, adultTickets, childTickets;

float sales, tRev, dRev;

The user is prompted to enter the number of tickets for both adults and children.

cout<<"Enter the number of adult tickets "<<endl;

cin >> adultTickets;

cout<<"Enter the number of child tickets "<<endl;

cin >> childTickets;

Following the input from the user, total sales, the earnings of both the theater and the distributor are calculated.

total sales made by the theater

sales = (adultFee * adultTickets) + (childFee * childTickets);

total revenue earned by the theater

tRev = (0.2 * sales);

total revenue earned by the distributor

dRev = (sales - tRev);

As a last step, total sales, theater revenue and distributors profit are displayed.

All the steps shown above are put down and the program is shown below.

int main()

{

float adultFee = 10, childFee = 6, adultTickets, childTickets;

float sales, tRev, dRev;

cout<<"Enter the number of adult tickets "<<endl;

cin >> adultTickets;

cout<<"Enter the number of child tickets "<<endl;

cin >> childTickets;

// total sales made by the theater

sales = (adultFee * adultTickets) + (childFee * childTickets);

// total revenue earned by the theater

tRev = (0.2 * sales);

// total revenue earned by the distributor

dRev = (sales - tRev);

cout<<"Total sales made by the theater $" << sales << endl;

cout<<"Total revenue earned by the theater $" << tRev << endl;

cout<<"Total revenue earned by the distributor $" << dRev << endl;

}

You might be interested in
Need the answer ASAP!!!
Vlad1618 [11]

Answer: type and create of the software

Explanation:

pls mark brainliest

6 0
3 years ago
Case Study/Scenario: First, Julio clicks Tools from the Chrome menu on the toolbar. Next, he looks for Manage Add-Ons but can no
Margarita [4]

Answer:

Follows are the solution to this question:

Explanation:

Throughout this scenario, Julio chooses the wrong way to handle the add-ons, instead, he opens the option to search and then type add-ons, where the manager can search for add-ons. It is a software extension that provides an application of additional features. It can broaden certain features, introduce additional features to just the interface surface, or provide extra capabilities for both the system.

4 0
3 years ago
15 Points ASAP
DaniilM [7]
18 Point is the smallest font size on a slide
7 0
3 years ago
Read 2 more answers
For question 1-3, consider the following program: def tryIt(a ,b = 7) return a + b
tino4ka555 [31]

Answer:

1)18

2)4

3)28

Explanation:

1) ans= tryIt(2) *2

        = (2+7)* 2 =18

2) ans= tryIt(-5) *2

        = (-5+7)* 2 =4

3) ans= tryIt(7) *2

        = (7+7)* 2 =28

3 0
3 years ago
Write any 2 differences between implicit variables and explicit variables.​Plz tell :' (
Marrrta [24]
Explicit is stated very clearly
Implicit is implied
Explicit leaves no room for confusion
Implicit doesn’t have to be directly stated
3 0
3 years ago
Other questions:
  • TCP will guarantee that your packets will arrive at the destination, as long as the connection is still established. True False
    11·1 answer
  • We must know the Inflation Rate and the Nominal GDP in order to calculate Real GDP.
    15·1 answer
  • darren wants to substitute every occurence of the word bulky in his spreadsheet with the word strong. which of these options sho
    9·2 answers
  • Jeremy Aronoff has purchased a new laptop. He wants to customize the operating system to meet his
    7·1 answer
  • Drag each tile to the correct box.
    9·1 answer
  • Excel files have a default extension of ?
    12·1 answer
  • When proposing a plan in detail for video production phases, fundraising, and outreaching, which section will you use to make su
    14·2 answers
  • Help asap !!!<br>which component of cpu controls the overall operation of computer..​
    9·1 answer
  • Which activity is the best example of a negative habit that may result from
    12·1 answer
  • What are some things you think are worthwhile and are willing to work harder to accomplish? Check all that apply.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!