Question

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++

Homework Answers

Answer #1

C++ code:  

#include<iostream>
#include<string>
using namespace std;

int main()
{
   // variable intialization to store data
string movie;
float adultTicketPrice, childTicketPrice, percentageDonated, amountDonated;
int adultTickets, childTickets;
  
// get data
cout<<"Enter movie name: ";
getline(cin, movie);
cout<<"Adult ticket price: ";
cin>>adultTicketPrice;
cout<<"Child ticket price: ";
cin>>childTicketPrice;
cout<<"Number of adult tickets sold: ";
cin>>adultTickets;
   cout<<"Number of adult tickets sold: ";
cin>>childTickets;
   cout<<"Percentage of gross amount to be donated: ";
   cin>>percentageDonated;
  
   // callculate amount to be donated
   float totalAmount = ((adultTicketPrice * adultTickets) + (childTicketPrice * childTickets));
   amountDonated = (totalAmount*percentageDonated)/100;
  
   // print amount
   cout<<endl<<"Total amount to bedonated: "<<amountDonated<<endl;
}

Output :

Enter movie name: xyz
Adult ticket price: 100
Child ticket price: 60
Number of adult tickets sold: 200
Number of adult tickets sold: 25
Percentage of gross amount to be donated: 20

Total amount to bedonated: 4300

Hope you like it

Any Query? Comment Down!

I have written for you, Please up vote the answer as it encourage us to serve you Best !

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
A movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder...
A movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder goes to the movie distributor. Write a program that calculates a theater’s gross and net box office profit for a night. The program should ask for the name of the movie, and how many adult and child tickets were sold and the price of adult and price of the child ticket. It should display a report similar to: Movie Name: “Wheels of Fury” Adult...
Buddies is a charitable organization that sponsors group activities and provides adult companionship for troubled youths...
Buddies is a charitable organization that sponsors group activities and provides adult companionship for troubled youths from single-parent families. Buddies screens, trains, motivates, and supervises the adult volunteers, who are paired with children referred by local agencies and by parents concerned with their children’s future. The organization provides a service that can augment any professional help a child may be receiving. But its main role is one of prevention by providing a meaningful adult relationship for a child before the...
Buddies is a charitable organization that sponsors group activities and provides adult companionship for troubled youths...
Buddies is a charitable organization that sponsors group activities and provides adult companionship for troubled youths from single-parent families. Buddies screens, trains, motivates, and supervises the adult volunteers, who are paired with children referred by local agencies and by parents concerned with their children’s future. The organization provides a service that can augment any professional help a child may be receiving. But its main role is one of prevention by providing a meaningful adult relationship for a child before the...
Buddies is a charitable organization that sponsors group activities and provides adult companionship for troubled youths...
Buddies is a charitable organization that sponsors group activities and provides adult companionship for troubled youths from single-parent families. Buddies screens, trains, motivates, and supervises the adult volunteers, who are paired with children referred by local agencies and by parents concerned with their children’s future. The organization provides a service that can augment any professional help a child may be receiving. But its main role is one of prevention by providing a meaningful adult relationship for a child before the...
Please read the article and answear about questions. Determining the Value of the Business After you...
Please read the article and answear about questions. Determining the Value of the Business After you have completed a thorough and exacting investigation, you need to analyze all the infor- mation you have gathered. This is the time to consult with your business, financial, and legal advis- ers to arrive at an estimate of the value of the business. Outside advisers are impartial and are more likely to see the bad things about the business than are you. You should...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how the firms resources incompetencies support the given pressures regarding costs and local responsiveness. Describe entry modes have they usually used, and whether they are appropriate for the given strategy. Any key issues in their global strategy? casestudy: Atlanta, June 17, 2014. Sea of Delta employees and their families swarmed between food trucks, amusement park booths, and entertainment venues that were scattered throughout what would...
Mattel Responds to Ethical Challenges Business Ethics This case was written by Debbie Thorne, John Fraedrich,...
Mattel Responds to Ethical Challenges Business Ethics This case was written by Debbie Thorne, John Fraedrich, O. C. Ferrell, and Jennifer Jackson, with the editorial assistance of Jennifer Sawayda. This case was developed for classroom discussion rather than to illustrate either effective or ineffective handling of an administrative, ethical, or legal discussion by management. All sources used for this case were obtained through publicly available material. Mattel, Inc. is a world leader in the design, manufacture, and marketing of family...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT