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]
2 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]2 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
Create a class named CollegeCourse that includes the following data fields: dept (String) - holds the department (for example, E
frez [133]

Answer:

The answer to this question can be given as:

code:

class CollegeCourse  

{

String Dept;

int CourseNumber;

double Credits;

double fee;

}

Explanation:

We all know that class is a collection of data members and member functions. In the above code we use the following syntax for class declaration that can be given as:

Syntax of class declaration :

class class_name

{

data member & member function

}

In the above code firstly we declare a class that is CollegeCourse. In this class, we define a variable that name and datatype is already given in the question that is String Dept, int CourseNumber, double Credits, double fee. In the variables first variable data type is string. It is used for store string value like ('us','xxx','aaa').The second variable datatype is an integer. It is used for store integer value like (1,23,5,56). The third and fourth variable datatype is the same that is double. This data type is used to store the floating-point value.

5 0
2 years ago
The five types of personal computers are: desktops, laptops, tablets, smartphones, and
shepuryov [24]

Answer:

microcomputers

Explanation:

8 0
2 years ago
Bob flys a drone which has a 20 megapixel camera attached, what is the definition of "megapixel in this context? Why does it mat
Verizon [17]

Answer:

megapixel refers to the unit of resolution i.e. one million

Explanation:

Interestingly the higher the pixels does not mean higher quality of image, it's more about the camera and it's sensor.

I am a photographer and a licensed drone pilot and have researched the subject to help with camera choice, both DSLR and drone.

5 0
2 years ago
The following sentence has a mistake.
Alja [10]

Answer:

You would put the cursor after the letter v in vermont and press back space and type a capital V to make it Vermont.

6 0
3 years ago
The section of the cpu that is responsible for performing mathematical operations.
nlexa [21]

The CPU executes arithmetic and logic operations in the arithmetic and logic unit (ALU).

<h3>What is an ALU, or an arithmetic and logic unit?</h3>
  • A combinational digital circuit known as an arithmetic logic unit computes arithmetic and bitwise operations on integer binary integers.
  • A floating-point unit, on the other hand, works with floating-point numbers.
  • The component of a central processing unit known as an arithmetic-logic unit performs arithmetic and logic operations on the operands in computer instruction words.
  • An Arithmetic Logic Unit (ALU) is a component found within computers that can execute logical operations in addition to arithmetic operations, such as AND, OR, Ex-OR, invert, etc (e.g. Addition, Subtraction, etc.).

To learn more about arithmetic and logic unit (ALU), refer to:

brainly.com/question/7994884

#SPJ4

4 0
1 year ago
Other questions:
  • What will the following program display?
    15·1 answer
  • When entering a expressway using a weave lane you must do what
    7·1 answer
  • A company wants to inform a select list of it's regular customers about a flash sale. Which type of platform will it use to send
    9·1 answer
  • Which of the following is true of the poka-yoke approach used for mistake-proofing processes?
    9·2 answers
  • You dad has given you his old digital scanner for your new computer. you plug it into the usb drive on your windows 8 computer b
    8·1 answer
  • कम्प्युटर को पहिलो पुस्ता भनेको के हो?​
    8·2 answers
  • How does Shakespeare immediately introduce Tybalt as a menacing character?
    9·1 answer
  • EASY What does the Backspace key do?
    6·1 answer
  • Tinh T = a1*a2*a3*...an<br><br> Giúp em với
    13·1 answer
  • Consider the following variable declarations and initializations.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!