algorithm
Adults? Store Adults in Adults
Children? Store Children in Children
totaal price=13*ADULTS +8*Children
If Adults +children >5, then total price=.9*total price
otherwise go to finish
Finish: Print: Total price
I haven't done this before and I need some help starting 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
3 answers
you could add this subroutine...
If Children > 7*Adults then
? That is quite a lot of children to supervise at once. Are you certain?
Input answer: if Yes, then go to total price. otherwise, go in Adults?
If Children > 7*Adults then
? That is quite a lot of children to supervise at once. Are you certain?
Input answer: if Yes, then go to total price. otherwise, go in Adults?
80% efficient