erin ate 1/4 of her cookies for snack .she had 18 left in her bag.how many did she have in the bag before she ate her snack?

Let x = original number of cookies.

18 = (1-.25)x

Solve for x.