Question: 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


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 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. 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 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
Get step-by-step solutions from verified subject matter experts
