I want to calculate the amount of tickets that can be purchased in packages of 4 at a discounted rate or individually for full price. I don't know how to write the code that determines how many packages plus any individual tickets that will need to be purchased based on the amount requested.
Asked
Active
Viewed 14 times
1 Answers
0
Just do
var purchasedPackages = (tickets / 4)
var individualTickets = tickets % 4
:)

Brandon Curtis
- 16
- 2