(I skiped some parts ,since it can't be displayed)
function ticket(age)
{var result
if ( age >= 18 ){result=10}
else{result=8}
return result}
const gstRate = 0.06
var pstRate = 0
var gst, pst, ticketCost, totalCost, age,ticket
pstRate = inputNum("PST rate ", 0.08)
age = inputNum("How old are you", 18)
ticketCost = ticket(age)
gst = ticketCost * gstRate
pst = ticketCost * pstRate
totalCost = ticketCost + gst + pst