Question 2 (20%)
Write a program to calculate the total charges for a buffet based on number of persons (adult,
child or senior) according to Table 1. The program accepts 3 integers in order: the number of
adults, the number of children, and the number of seniors. It then outputs the total charge.
If the number of people is more than 6, a 15% discount will be given. Otherwise, there will be
no discount at all. The total charge is subject to 10% service charge (based on the original
price). Format the output to two decimal places.
5th digit of Student ID
Adult
Child
Senior
Odd
$758
$468
$598
Even
$798
$488
$618
Sample display (for odd)
2
1
1
2840.20
Sample display (for odd)
4
3
2
5350.40
Sample display (for even)
2
1
1
2972.20
Sample display (for even)
4
3
2
5597.40