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
Discuss why diffrent user interface require the use of diffrent type of input device<br>​
Bas_tet [7]

Discuss why different user interfaces require the use of different types of input device. Page 15. What is Secondary Storage? List 3 Storage Mediums: What is ...

mark me brain list

7 0
2 years ago
Preciso de ajudar para resolver esse exercício, é para amanhã cedo!!<br><br> Em Dev C++
LenKa [72]
Bbbbbbbbbbbbbbbbbbbbbb
3 0
2 years ago
Read 2 more answers
Instructions:Type the correct answer in the box. Spell all words correctly.
weeeeeb [17]
The answer should be RAM = Random Access Memory

RAM memory is used to store current data while the computer is on. Bear in mind that after the computer is shutdown all data in RAM is lost.
6 0
3 years ago
Read 2 more answers
What is the difference between margin and padding property?
VMariaS [17]

Answer:

Margin is applied to the outside of your element hence affecting how far your element is away from other elements.

Padding is applied to the inside of your element hence affecting how far your element's content is away from the border.

Explanation:

Hope it helps!!!

6 0
1 year ago
JavaScript uses which property to change the current content of HTML elements?
solong [7]

Answer:

innerHTML

Explanation:

3 0
3 years ago
Other questions:
  • 1. An Excel file is called a workbook?<br> A) True<br> B) False
    6·2 answers
  • A cloud file system (CFS) allows users or applications to directly manipulate files that reside on the cloud.
    6·1 answer
  • GUI allows users to communicate with a device and see what they are doing onscreen.
    9·1 answer
  • What symbol indicates that material has been copyrighted?
    8·2 answers
  • Working with do-while loop
    9·1 answer
  • Cloud-based services can open doors to leveraging Artificial Intelligence (AI) without dramatically increasing risk. Which clien
    9·1 answer
  • Can you help me with this question please ​
    13·1 answer
  • What is the difference between a LAN and WAN? how do these two networks interact?​
    14·1 answer
  • In Fantasy Football, participants compete against one another by choosing certain players from different NFL teams that they thi
    14·1 answer
  • you want to run your campaign for your dry-cleaning service across three different publishers, each with different video creativ
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!