Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6th digit of student id = 2 no prompt message is required NO error input checking is needed unless it is required by the question

image text in transcribedimage text in transcribedimage text in transcribed

6th digit of student id = 2

no prompt message is required

NO error input checking is needed unless it is required by the question

You may include more header files and write user-defined functions to solve the questions

Make sure that your file CAN be opened and has NO syntax error

Write a program for calculating the bill charged for a Chinese "dim sum" lunch. It accepts the following user's inputs (in order): (1) number of persons, (2) membership rank (' G ', ' S ', ' B ', 'N'), (3) number of "small" dish, (4) number of "medium" dish, and (5) number of "large" dish. It calculates and prints the final bill according to the charging rules below. Input on number of persons is always positive, while inputs on number of dishes are always non-negative. The membership rank is a character input, where ' G ' stands for "Gold", ' S ' stands for "Silver", 'B' stands for "Bronze", and 'N' stands for "None". Determine the odd or even version of this question using the 6th digit of your student ID number. Price of a dish (in dollars) Cover charge per person Cover charge per person Extra discount based on membership rank and number of persons Note that the final bill is subject to a 10% service charge. It is calculated based on the original price, which is the sum of the price of all dishes and the discounted, if applicable, cover charge. Format the output to two decimal places. Sample display IMPORTANT NOTE: You need to follow all text and order as shown in the sample display. There should be NO prompt messages and additional blank lines in the output. DO NOT add extra text in the output which will be considered as incorrect in marking

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

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions

Question

=+ f. instituting laws against driving while intoxicated

Answered: 1 week ago