Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code in C++ Lab # 1-variable declarations, calculations, and I/O Requirements: An auditorium holds events and charges $29.50 for tickets to the events. The cost

image text in transcribedCode in C++image text in transcribed

Lab # 1-variable declarations, calculations, and I/O Requirements: An auditorium holds events and charges $29.50 for tickets to the events. The cost to hold events is $1,450.00. Create a project in Code:Blocks and write a program that computes gross receipts based on the number of tickets sold, and computes the profit from the event based upon the total receipts and the cost to hold the event. The user will enter the number of tickets sold, and the program will compute the gross receipts for the event, and the profit. The program will output a request (prompt) to the user for the input. The program will compute the gross receipts from the event. The program will compute the profit from the event. The program will output to the console window the tickets sold, gross receipts, and profit. The output will be formatted as shown below with the values right aligned. Good programming habits: The program will have a comment at the top with your name, the lab number, and a brief description of the program. The program should use good variable naming convention (uppercasing is preferred) SAMPLE PROMPT and OUTPUT: EABCCSpring 20191CSE 110 102\CSE 110 Labs NEW Lab Enter the number of tickets sold 119 Tickets sold: Gross receipts: 3510.50 Euent profit: 2060.50 Enter the number of tickets sold 119 Tickets sold Gross receipts: $xxx.xx Event profit: $xxx.xx Process returned 0 (0x0) Press any key to execution ti continue Output format specifiers for currency (doubles) fixed, showpoint, and precision (pg 114 -117) Requirements: The auditorium from Lab #1 has now opened the balcony seats for their events. After the 200 floor seats have been sold at $29.50 each, the 50 balcony seats are sold for $19.00 each (once all of the floor seats are sold). The cost to hold events is still $1,450.00 Write a program (or modify Lab #1) to determine the number of floor tickets sold and the number of balcony tickets sold, the receipts for each, and the gross receipts based on the total number of tickets sold, and profit. The user will enter the total number of tickets sold, and the program will compute the number of tickets sold of each type, the receipts for each ticket type, the gross receipts for the event, and the profit. If no balcony tickets have been sold, the output should be zero for the balcony tickets sold and balcony ticket receipts. The program will prompt the user for the total number of tickets sold. The program will compute the number of floor and balcony tickets sold and the receipts from each Then the total receipts for the event and profit. The program will provide output to the console window for the values shown below formatted as shown (screen captures on next page) Do not be concerned about an input greater than 250 for tickets sold

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

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions

Question

HOW DO YOU FEED YOUR MIND AND YOUR HEART AS A LEADER?

Answered: 1 week ago