Question 15
AQA Computer Science June 2023 Paper 1C (8525/1C)GCSE8 marks
On the specification
- 3.2 Programming
Question text
15 A group of people have a meal in a restaurant. Instead of one person paying for the box whole meal, each person will pay for what they eat. Write a VB.NET program that asks each person in the group how much they are paying towards the meal and works out when the bill is fully paid. Each person can pay a different amount. The program should: • get the user to enter the total amount of the bill • get a person to enter how much they are paying towards the bill • subtract the amount entered from the bill: o if the amount left to pay is more than 0, output how much is left to pay and repeat until the amount left to pay is 0 or less o if the amount left to pay is 0, then output the message Bill paid o if the amount left to pay is less than 0, then output the message Tip is and the difference between the amount left to pay and 0 You should use meaningful variable name(s) and VB.NET syntax in your answer. The answer grid below contains vertical lines to help you indent your code. [8 marks]