ticket office
Hi, I solved ticket office project code (related to Data Types, Arrays, Pointers) but it doesn't approve me while the answers are as expected, could you please have a look at code below: #include <iostream> #include <algorithm> using namespace std; int main() { int ages[5]; for (int i = 0; i < 5; ++i) { cin >> ages[i]; } //your code goes here int &min = *min_element(ages, ages+5); cout << "youngest person age is: " << min << endl; float totalPris = 50; float discount = (totalPris*min)/100; cout << "discount: " << discount << endl; totalPris = (totalPris - discount); cout << "total price for your group is: " << totalPris << endl; return 0; }