Can I have help on how to do this?

A programmer is writing a total ticket price calculator for a theme park. The park offers the price of £13 per adults and £8 per child. There is a bulk purchase discount of 10% off the total price if there are more than 5 people.

Write an algorithm that:
Asks for the number of adult tickets
Asks for the number of child tickets
Calculate the total price
Checks to see if there are more than five people and applies the appropriate discount
Produces the appropriate ticket price

It's already been answered

Certainly! I can help you with that.

Here's an algorithm that you can use to calculate the total ticket price for the theme park:

1. Start by asking the user for the number of adult tickets and store it in a variable, let's call it "adultTickets."
2. Then, ask the user for the number of child tickets and store it in a variable, let's call it "childTickets."
3. Calculate the total price by multiplying the number of adult tickets by the price per adult (£13) and the number of child tickets by the price per child (£8). Add these two values together and store the result in a variable, let's call it "totalPrice."
- You can calculate the total price using the formula: totalPrice = (adultTickets * 13) + (childTickets * 8).
4. Check if the total number of people (adults + children) is more than 5. If it is, apply a 10% discount to the total price.
- You can check this condition using an if statement, like: if ((adultTickets + childTickets) > 5).
- If the condition is true, you can calculate the discounted price as: discountedPrice = totalPrice * 0.9 (10% off the total price).
- Otherwise, no discount is applied, and the discounted price would be equal to the total price.
5. Finally, display the appropriate ticket price to the user, based on whether a discount was applied or not.

Here's a pseudo code representation of the algorithm:

```
1. Ask for adultTickets
2. Ask for childTickets
3. totalPrice = (adultTickets * 13) + (childTickets * 8)
4. if ((adultTickets + childTickets) > 5)
discountedPrice = totalPrice * 0.9
else
discountedPrice = totalPrice
5. Display discountedPrice
```

You can implement this algorithm in your preferred programming language by converting the steps into actual code.