Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

305 052017.pdt Nini 1.0License-Englishpr EE209,052017.pdf XEY ? file://cusers/ed

ID: 3348506 • Letter: 3

Question

305 052017.pdt Nini 1.0License-Englishpr EE209,052017.pdf XEY ? file://cusers/ed at OneDrive DocumentsMay Aug%202017/EE209,052017pdf (b) A movie theater only keeps 20% of the revenue earned from ticket sales. The remainder goes to the movie distributor. Conceive 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: Movie Name: "Wheels of Fury" Adult Tickets Sold: 382 Child Tickets Sold: 127 Gross Box Office Profit: $ 2673.00 Net Box Office Profit: $534.60 Amount Paid to Distributor: $ 2138.40 (15 marks)

Explanation / Answer

Algorithm for the program.

Step1. Display the movie name.

Step2. Ask number of adult ticket sold from user.

Step3. Ask number of child ticket sold from user.

Step4. Calculate the gross box office profit at rate 6$ for adult ticket and 3$ for child ticket.

Step5. Calculate net box office profit.

Step6. Calculate amount paid to distributer.

Step. Display output in given manner.

Matlab code for the program

a=input('Adult Tickets sold : ');

b=input('Child tickets sold : ');

c=a*6+b*3;

d=(c*20)/100;

e=c-d;

disp('Adult tickets sold ');

disp(a);

disp('child tickets sold ');

disp(b);

disp('Gross box office profit ');

disp(c);

disp('Net box office profit ');

disp(d);

disp('amount paid to distributer ');

disp(e);



Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote