+ 1

Help

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

22nd Apr 2022, 4:42 PM
Namatovu Najah
4 Answers
+ 1
Your code has obvious compile errors. 8: CZ for (int i = 0; i < 5; ++i) { <- remove CZ 15: dis=50-min[0]% <- finish statement 20: return 0; <- remove extra 21: } <- remove extra
22nd Apr 2022, 7:26 PM
John Wells
John Wells - avatar
+ 1
Am stuck
23rd Apr 2022, 7:33 PM
Namatovu Najah
22nd Apr 2022, 4:47 PM
Namatovu Najah
0
If u stuck Its better to search the topic in code section
23rd Apr 2022, 1:00 AM
ÄKoderj