A movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder goes

Question:

A movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder goes to the 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. (The price of an adult ticket is $6.00 and a child's ticket is $3.00.) It should display a report similar to the following:
Movie Name: ........................ Wheels of Fury
Adult Tickets Sold: ................ 382
Child Tickets Sold: ................ 127
Gross Box Office Profit: ......... $2673.00
Amount Paid toDistributor: ..... $2138.40
Net Box OfficeProfit: ........... $ 534.60
Assume the theater keeps 20 percent of the gross boxoffice profit.
Must use the setprecision option.
i have this but im not sure if this works.
#include
#include
using namespace std;
int main ()
{
// variables
float adult;
float child;
float gross;
float net;
float child_price = 3.00;
float adult_price = 6.00;
float cut;
float cut_amt = (20/100);
char movieName;
char noAdult;
char noChild;
// assign data
cout << "Enter name of movie" << endl;
movieName = cin.get ();
cin.ignore ();
cout << "Enter how many adult tickets were sold" << endl;
noAdult = cin.get ();
cin.ignore ();
cout << "Enter how many child tickets were sold" << endl;
noChild = cin.get();
//calculation
adult = noAdult * adult_price;
child = noChild * child_price;
gross = adult + child;
cut = gross * cut_amt;
net = gross - cut;
//display
cout << "Movie Name;" << setw (10) << movieName << endl;
cout << "Adult Tickets Sold:" << setw (10) << noAdult << endl;
cout << "Child Tickets Sold:" << setw (10) << noChild << endl;
cout << "Gross Box Office Profit: $" << setw (10) << gross << endl;
cout << "Net Box Office Profit: $" << setw (10) << net << endl;
cout << "Amount Paid to Distributor: $" << setw (10) <return 0;
}
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question
Question Posted: