0

Ticket system question in c++

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

26th Sep 2021, 2:42 PM
Joel Sebastian Jijo
Joel Sebastian Jijo - avatar
5 Réponses
26th Sep 2021, 4:13 PM
mesarthim
mesarthim - avatar
0
Oh sorry i actually removed it to start all over again. Ill try to do it again
26th Sep 2021, 2:59 PM
Joel Sebastian Jijo
Joel Sebastian Jijo - avatar
0
#include <iostream> using namespace std; int main() { int ages[5]; for (int i = 0; i < 5; ++i) { cin >> ages[i]; } return 0; } What to do frm here?
26th Sep 2021, 3:03 PM
Joel Sebastian Jijo
Joel Sebastian Jijo - avatar
0
Thankyou i get it now
27th Sep 2021, 2:32 AM
Joel Sebastian Jijo
Joel Sebastian Jijo - avatar