Answered step by step
Verified Expert Solution
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
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 markingStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started