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
What does the following if statement do?<br><br> if (num1 == Math.abs(num1))
Gennadij [26K]

This statement checks if num1 is equal to the absolute value of num1

For instance,

num1 = 4 and the absolute value of num1 = 4. This would run the code inside the if statement but if num1 = -1 the absolute value of num1 = 1 and the if stamtent would be skipped because -1 does not equal 1

6 0
2 years ago
PLZZZ HELLPP... PhotoShop
Burka [1]
LEFT SIDE :
Layer menu
Layer filters
Layer groups
Link layers

BOTTOM :
Layer effects
Layer menu
Visibility

RIGHT SIDE :
Add new layer
Opacity
Fill opacity

4 0
3 years ago
On an unweighted scale, a grade of A is worth _____ points
Lubov Fominskaja [6]
On an unweighted scale, a grade of A is worth 4 points and  B. 3 points, C. 2 points, and D 1 point. E. 0 points. If you're trying to calculate your gpa then simply add all of those together! BAM                                                                                 
7 0
3 years ago
To use cut and paste, click the cut button from the ____ group on the home tab.
Setler [38]

I guess the correct answer is Clipboard

A clipbοard is a tеmpοrary stοragе arеa fοr data that thе usеr wants tο cοpy frοm οnе placе tο anοthеr. In a wοrd prοcеssοr applicatiοn, fοr еxamplе, thе usеr might want tο cut tеxt frοm οnе part οf a dοcumеnt and pastе it in anοthеr part οf thе dοcumеnt οr sοmеwhеrе еlsе.


5 0
3 years ago
Discuss the impact of vision on your actions to keep a clean environment​
mr_godi [17]

Answer:

For healthy living a clean environment is crucial: The more you care about our environment, the more contaminants and toxins that have a detrimental effect on our health are polluted. Air pollution can lead, among other problems and diseases, to respiratory and cancer problems

Explanation:

Ensuring and improving the climate is an important resource for Irelanders. To safeguard against radiation and contamination damage our kin and the climate.

We have the vision:

A perfect environment to promote practical society and economy, which is sound and very secure.

Very few people are working to keep the environment clean. Although municipal authorities are responsible for making sure the environment is clean, the clean and green environment must also be supported.

Reasons Why We Should Care About the Environment

An essential part of human survival is the environment in which we live. I believe that people who don't care about the environment simply don't know how important it is for us all and how it doesn't directly affect them, which is why I want you to worry about the environment.

Earth Is Warming: We must do more to fight climate change for our children and our future. Yes, no single event trends. Yes, it is true. You can't ignore that now.

Biodiversity is essential: the diversity of plants, animals and the rest of our world is concerned with biodiversity. Habitat loss and degradation due, among other things, to human activity, climate change, and pollution could be negatively affected.

6 0
3 years ago
Other questions:
  • BITS wants to store information about the supervisors, including their supervisor number and the relationship to consultants. Su
    15·1 answer
  • What’s the answer to this question?
    15·1 answer
  • Nam june paik’s ________ combines recognizable and distorted images made using a synthesizer to modulate video signals.
    9·1 answer
  • A(n) _______________ is a collection of configuration and security settings that an administrator has created in order to apply
    14·1 answer
  • Which domain indicated the website is sponsored by the university or college
    10·1 answer
  • Are the buying and selling of stocks centralized activities? Why or why not?
    10·2 answers
  • What is the output produced from the following statements? System.out.println("\"Quotes\""); System.out.println("Slashes \\//");
    8·1 answer
  • Global address list characteristics
    11·1 answer
  • Monero is cryptocurrency that focuses on transparency of ownership. True or false
    12·1 answer
  • Which very high-speed fiber network was already in place and being used for wide area networking (wan) transmissions, before the
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!