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...


You are working on a ticketing system. A ticket costs $10.<br>The office is running a discount campaign: each group of 5 people is getting a discount, which is determined by the age of the<br>youngest person in the group.<br>You need to create a program that takes the ages of all 5 people as input and outputs the total price of the tickets.<br>Sample Input:<br>55<br>28<br>15<br>38<br>63<br>Sample Output:<br>42.5<br>The youngest age is 15, so the group gets a 15% discount from the total price, which is $50 - 15% = $42.5<br>The given code is declaring an array of 5 elements and taking them from input using a loop.<br>

Extracted text: 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 The given code is declaring an array of 5 elements and taking them from input using a loop.

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here