-3

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.

1 Answers1

0

Just do

var purchasedPackages = (tickets / 4)
var individualTickets = tickets % 4

:)