about | help | code help+videos | done | prefs |
Amy has invited n of her friends for a movie. Each ticket costs $10. There is a promotion where for every 5 tickets bought, one person gets free admission. Define a function that when passed the number of friends invited, returns the total amount. totalTicketPrice(5) → 50 totalTicketPrice(4) → 50 totalTicketPrice(18) → 160 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 3 Post-solution available
Copyright Nick Parlante 2017 - privacy