Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The local cinema must send 80% of its ticket receipts to the movie distributor. The manager has asked you to write a small program that

The local cinema must send 80% of its ticket receipts to the movie distributor. The manager has asked you to write a small program that will print an invoice for weekly ticket income and profits for a given movie.

Adult tickets sell for $7.50 and children tickets are $4.75. The program will ask the user for the name of the movie, the number of adults tickets sold, and the number of children tickets sold. Use a C-String to store the movie name (see Lecture 4).

The program will compute the gross box office revenue, the distributor amount, and the net profit. It will then echo back the movie name along with the three computed values. It should display the amounts using a dollar sign and two decimal places (use setprecision() ). Use setw() to get the decimal places to align. An interaction should look similar to this:

What is the name of the movie? Hoosiers

How many adult tickets sold? 211

How many children tickets sold? 73

Movie Name: Hoosiers

Gross Box Office Revenue: $ 1929.25

Distributor Amount: $ 1543.40

Net Profit: $ 385.85

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

ISBN: 0130913677, 978-0130913678

More Books

Students also viewed these Databases questions