0

C++ solution using array concept

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

19th Jul 2022, 10:10 AM
KRM Fahith
KRM Fahith - avatar
2 odpowiedzi
+ 1
Please, always search the forum first before posting new questions. Especially because this is a code coach task, which presumably means some people had tried it, and asked questions around it. https://www.sololearn.com/Discuss/2703235/?ref=app https://www.sololearn.com/Discuss/2949715/?ref=app https://www.sololearn.com/Discuss/2974421/?ref=app
19th Jul 2022, 12:58 PM
Ipang
+ 1
KRM Fahith And remember to start your own attempt before searching for help. The logic challenge is what really teach us programming.
19th Jul 2022, 1:38 PM
Emerson Prado
Emerson Prado - avatar