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

PLEASE USE C++

Solutions

Expert Solution

The percentage of amount to be donated to charity can be calculate as :

donation_amount = percentage * (adult_price * adult_ticket + child_price * child_ticket) / 100

The c++ code for the given problem is:

#include <iostream>
#include <string>

using namespace std;

int main()
{
    string movie;
    int adult_price, child_price, adult_ticket, child_ticket, charity;
    cout<<"Enter movie name : ";
    cin>>movie;
    
    cout<<"\nEnter number of adult tickets sold : ";
    cin>>adult_ticket;
    
    cout<<"\nEnter number of child tickets sold : ";
    cin>>child_ticket;
    
    cout<<"\nEnter price of adult tickets : ";
    cin>>adult_price;
    
    cout<<"\nEnter price of child tickets : ";
    cin>>child_price;
    
    cout<<"\nEnter the percentage of total to be donated to charity : ";
    cin>>charity;
    
    int donation_amount = charity * (adult_price * adult_ticket + child_price * child_ticket) / 100;
    
    cout<<"\nThe amount to be donated to charity is : "<<donation_amount;
    
    return 0;
}

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...
•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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT