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
True or False: It is illegal to park in a location that you block or create a hazard for other vehicles.
Feliz [49]
The answer to question is true
5 0
3 years ago
Read 2 more answers
Sub to the channel plz plz
Hunter-Best [27]

Answer:

um

Explanation:

6 0
2 years ago
Read 2 more answers
Where can elicitation techniques be used?
Nikitich [7]

Answer:

An elicitation technique is any of a number of data collection techniques used in anthropology, cognitive science, counseling, education, knowledge engineering, linguistics, management, philosophy, psychology, or other fields to gather knowledge or information from people.

Explanation:

3 0
2 years ago
True or false? malware problems and other compromises of your computer information are rare.
Marina86 [1]
I think that is false I am not 100% sure.
3 0
3 years ago
The query [windows], English (US) has two dominant interpretations: the operating system and the windows in a home.
Flauer [41]

Answer:

B. False

Explanation:

Microsoft Windows is a graphics user interface operating system that uses windows query to search for information in its directory. There are different versions and updates of the windows OS, with latest being window 10 1903. The different version of the windows 10 OS is windows professional, Home, Enterprise etc. As time goes on, more updates will be released for better and advanced security.

3 0
3 years ago
Other questions:
  • What is the last step in conducting url search
    11·1 answer
  • The purpose of the ________ element is to describe the contents of a table.
    15·1 answer
  • ​In addition to joint application development, another popular user-oriented method is _____, which resembles a condensed versio
    14·1 answer
  • The basic input/output system (bios locates the boot loader program on a linux system by reading the __________ on the hard driv
    13·1 answer
  • Which of the following is a benefit, as well as a risk, associated with peer-to-peer networks?
    6·2 answers
  • You are given the task of reading in n numbers and then printing them out in sorted order. Suppose you have access to a balanced
    12·1 answer
  • Write a program that asks the p34won to enter their grade, and then prints GRADE is a fun grade. Your program should repeat thes
    7·1 answer
  • In a relational database, the three basic operations used to develop useful sets of data are:_________.
    14·1 answer
  • A software is made from​
    10·1 answer
  • The chain of _____ documents that the evidence was under strict control at all times and no unauthorized person was given the op
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!