There is a homework question that I really confuse about.. how to control the right inputs with loop control..
Please Help me and thank you
In a restaurant, meal is as follow:
- Meal A is $30
- Meal B is $22
- Meal C is $25
You
can order a drink with meal for extra $5. If you order cold drink,
another $2 will be charged. You are asked to design a flow chart and to
write a programme that calculates the meal charges. In order to ensure user to input appropriate response, you may use loop control to prompt users for any wrong inputs. The programme will continue only if users have responded correctly.
Note:
- Copy your code sitting in public static void Main() {...}
- Submit your flow chart in PDF format
Screen output 1: Choose your order, type (A/B/C): K
Wrong response! You may only choose A, B, or C: A
Do you want to order a drink? (Y/N): Y
Cold drink? (Y/N): Y
Total amount is 37, thank you!