0
help me.
You are working on a ticketing system. A ticket costs $10. The office is running a discount campaign: each group of 5 people is getting a discount, which is determined by the age of the youngest person in the group. You need to create a program that takes the ages of all 5 people as input and outputs the total price of the tickets. Sample Input: 55 28 15 38 63 Sample Output: 42.5 The youngest age is 15, so the group gets a 15% discount from the total price, which is $50 - 15% = $42.5 kinda stuck here...
1 ответ
+ 1
you should find the lowest number as input (age) then use it to be substracted to total tickets cost (5*$10) as percentage of total cost (discount)
for the sample input:
min_val = 15
result = 50 - 50*15/100
you need to implement than for the input provided (if code coach, you may have been provided a code template with input assigned to a variable) or that you need to collect...