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
When would you use a composite primary key? Group of answer choices
vichka [17]

Answer:

A. Multi-field attributes

B. A ternary relationship

C. A unary relationship

6 0
2 years ago
Read 2 more answers
The word blog is made from what two terms?
mafiozo [28]
• web + log = blog •
3 0
3 years ago
Write a simple JavaScript function named makeFullName with two parameters named givenName and familyName. The function should re
Kazeer [188]

Answer:

Explanation:

Ji

3 0
2 years ago
Lets assume we are writing a system to backup a list of transactions: class Transaction 1 String TransactioniD: Date TranactionT
zhannawk [14.2K]

Answer:

The answer is "Option d"

Explanation:

In this question, the easiest way that will save the payment on your database in such a process ID-sorting list would be to mark a payment, that's been recorded mostly on the database whenever this payment became used serial number is not transaction ID, and the wrong choice can be defined as follows:

  • In choice a, It is wrong because it may be processed, however, payments aren't entered through our process, which does not help remove older.
  • In choice b, the unordered list would not enable any transaction to only be retrieved, that's why it is wrong.
  • In choice c, it will not be helpful because the includes video is either begin or complete the payment, it will not be helpful to hold it with transaction time.
  • In choice e, this approach won't help to identify the payments since one date will have a lot of payments over a certain account.
6 0
3 years ago
Olivia works at a company that creates mobile phones. She wanted to estimate the mean amount of time their new phone's battery l
Kisachek [45]

An swer:  

                               

 E. xpl an ation:    

                               

3 0
2 years ago
Other questions:
  • You have been asked to create an authentication security plan for your company. Which of the following components would you inco
    14·1 answer
  • In Excel, what happens to the cell contents when you click and drag a cell into multiple cells?
    14·1 answer
  • What is a stereo type?
    14·2 answers
  • Which animation effects allow text or images to show movement on a slide? Check all that apply. Entrance, Emphasis, Exit, Motion
    5·2 answers
  • Which f the following is not a characteristic of igneous rock
    8·1 answer
  • What are computer virus ? Explain in detail.In your answer include symptoms and prevention (3each)
    10·1 answer
  • Just as arrays can only have a, set at the time the array is declared, a parameter list also can only have a fixed number of ele
    5·1 answer
  • Use the drop-down menus to complete each statement. Two main versions of Outlook are the desktop app and the app. The has limite
    15·2 answers
  • 1. What is the difference between a group and a topic?
    10·1 answer
  • You are the Emergency Management Director of a small island nation. Your nation has come under Cyber-attack and the attackers ha
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!