Flight tickets

Create the code which follows this design:

Algorithm

  1. Initialise ticket costs
  2. Get quantity of passengers
  3. Calculate initial cost of booking
  4. Update cost of booking if bag(s) are added
  5. Display final cost of booking

Refinements

  1. 2.1 Get number of adults
  2. 2.2 Get number of children

Click here for feedback on your answer. If everything goes green then you got it right!


Try more Parson's Problems.

mph@ghscomputing.com