Question

In: Computer Science

•A theater owner agrees to donate a portion of gross ticket sales to a charity •The...

•A theater owner agrees to donate a portion of gross ticket sales to a charity

•The program will prompt the user to input:

−Movie name

−Adult ticket price

−Child ticket price

−Number of adult tickets sold

−Number of child tickets sold

−Percentage of gross amount to be donated

•Inputs: movie name, adult and child ticket price, # adult and child tickets sold, and percentage of the gross to be donated

•The program needs to:

1.Get the movie name

2.Get the price of an adult ticket price

3.Get the price of a child ticket price

4.Get the number of adult tickets sold

5.Get the number of child tickets sold

USE C++

Solutions

Expert Solution

#include <iostream>
using namespace std;

int main() {
  
   string movieName;
   double adultTicketPrice,childTicketPrice, percentDonated;
  
   int adultTickets,childTickets;
  
  
   cout<<"Enter the movie name : ";
   cin>>movieName;
  
   cout<<"\nEnter adult ticket price : ";
   cin>>adultTicketPrice;
  
  
   cout<<"\nEnter child ticket price : ";
   cin>>childTicketPrice;
  
   cout<<"\nEnter the number of adult tickets sold : ";
   cin>>adultTickets;

   cout<<"\nEnter the number of child tickets sold : ";
   cin>>childTickets;
  
   cout<<"\nPercentage of gross amount to be donated : ";
   cin>>percentDonated;
  
   double totalAmount = (adultTicketPrice*adultTickets + childTicketPrice*childTickets)* percentDonated/100.00;
  
   double donation = totalAmount*percentDonated;
  
   cout<<" \nCharity amount = $"<<donation;
  
  
  
  
   return 0;
}

Output:

Enter the movie name : ToyStory4 
Enter adult ticket price : 5.99 
Enter child ticket price : 3.99 
Enter the number of adult tickets sold : 120 
Enter the number of child tickets sold : 210 
Percentage of gross amount to be donated : 5
Charity amount = $389.175

Do ask if any doubt.


Related Solutions

A theater owner agrees to donate a portion of gross ticket sales to a charity •The...
A theater owner agrees to donate a portion of gross ticket sales to a charity •The program will prompt the user to input: −Movie name −Adult ticket price −Child ticket price −Number of adult tickets sold −Number of child tickets sold −Percentage of gross amount to be donated •Inputs: movie name, adult and child ticket price, # adult and child tickets sold, and percentage of the gross to be donated •The program needs to: 1.Get the movie name 2.Get the...
The owner of a movie theater company would like to predict weekly gross revenue as a...
The owner of a movie theater company would like to predict weekly gross revenue as a function of advertising expenditures. Historical data for a sample of eight weeks follow. Weekly Gross Revenue ($1,000s) Television Advertising ($1,000s) Newspaper Advertising ($1,000s) 96 5 1.5 90 2 2 95 4 1.5 93 2.5 2.5 95 3 3.3 94 3.5 2.2 94 2.5 4.1 94 3 2.5 (a) Use α = 0.01 to test the hypotheses H0: β1 = β2 = 0 Ha: β1...
The owner of a movie theater company would like to predict weekly gross revenue as a...
The owner of a movie theater company would like to predict weekly gross revenue as a function of advertising expenditures. Historical data for a sample of eight weeks follow. Weekly Gross Revenue ($1,000s) Television Advertising ($1,000s) Newspaper Advertising ($1,000s) 96 5 1.5 91 2 2 95 4 1.5 93 2.5 2.5 95 3 3.3 94 3.5 2.3 94 2.5 4.1 94 3 2.5 (a) Use α = 0.01 to test the hypotheses H0: β1 = β2 = 0 Ha: β1...
The owner of a movie theater company would like to predict weekly gross revenue as a...
The owner of a movie theater company would like to predict weekly gross revenue as a function of advertising expenditures. Historical data for a sample of eight weeks follow. Weekly Gross Revenue ($1,000s) Television Advertising ($1,000s) Newspaper Advertising ($1,000s) 96 5 1.5 90 2 2 95 4 1.5 93 2.5 2.5 95 3 3.3 94 3.5 2.3 94 2.5 4.1 94 3 2.5 1. Use α = 0.01 to test the hypotheses H0: β1 = β2 = 0 Ha: β1...
In addition to cash contributions to charity, Dean decided to donate shares of stock and a...
In addition to cash contributions to charity, Dean decided to donate shares of stock and a portrait painted during the earlier part of the last century. Dean purchased the stock and the portrait many years ago as investments. Dean reported the following recipients: [The following information applies to the questions displayed below.] In addition to cash contributions to charity, Dean decided to donate shares of stock and a portrait painted during the earlier part of the last century. Dean purchased...
This is all one question: A theater uses the following table/sheet to manage ticket sales, which...
This is all one question: A theater uses the following table/sheet to manage ticket sales, which turned out to be a very bad practice. The manager of theater hires you to design a database to manage the ticket sale information.    TICKET-SALES (InvoiceNumber, CustomerID, ShowTitle, SeatType, SeatLocation, TicketPrice, CustomerName, CustomerCell, ShowTime, Director_of_Show) Note: A customer can purchase multiple seats in one order (with one InvoiceNumber). It is also the common sense that the price of a ticket/seat depends on the show,...
XYZ operates a movie theater. A movie ticket is $16.00 per ticket, and costs nothing
  XYZ operates a movie theater. A movie ticket is $16.00 per ticket, and costs nothing. On average 40% of the customers will buy a soda ($6 each, cost $1); 60% will buy food ($6 average price with a cost of $2). The fixed costs are $387,600. Calculate the break-even quantity and $sales for tickets, soda and food(10 points)   The theater wishes to make $96,900 profit. Calculate the target profit quantity and sales for tickets, soda and popcorn (10 points)...
16. In addition to cash contributions to charity, Dean decided to donate shares of stock and...
16. In addition to cash contributions to charity, Dean decided to donate shares of stock and a portrait painted during the earlier part of the last century. Dean purchased the stock and portrait many years ago as investments. Dean reported the following recipients: Charity Property Cost FMV State University Cash $ 16,000 $ 16,000 Red Cross Cash 15,000 15,000 State History Museum Painting 5,100 86,000 City Medical Center Dell stock 38,000 27,000 b. Assume that Dean’s AGI this year is...
ABC Catering is putting on a charity dinner. The average selling price for a ticket is...
ABC Catering is putting on a charity dinner. The average selling price for a ticket is $170. The variable cost for the dinner is $110. ABC will also incur fixed costs such as room rental fees and other fixed costs, totaling $30,000. How much sales revenue must ABC Catering generate in order to break even? b. How many tickets must ABC Catering attract in order to break even? Explain your answer. c. What is ABC Catering’s profit or loss at...
ABC Catering is putting on a charity dinner. The average selling price for a ticket is...
ABC Catering is putting on a charity dinner. The average selling price for a ticket is $170. The variable cost for the dinner is $110. ABC will also incur fixed costs such as room rental fees and other fixed costs, totalling $30,000. a. How much sales revenue must ABC Catering generate in order to break even? b. How many tickets must ABC Catering attract in order to break even? Explain your answer. c. What is ABC Catering’s profit or loss...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT