JavaScript

const movie = (card, ticket, perc) => { let n = 1; let frac = ticket * perc; let a = ticket * n; let b = card + frac; while(a < Math.ceil(b)) { n++; frac = frac * perc; b = b + frac; a = ticket * n; } return n; }

We're a place where coders share, stay up-to-date and grow their careers.

We strive for transparency and don't collect excess data.

## re: Daily Challenge #69 - Going to the Cinema VIEW POST

FULL DISCUSSIONJavaScript