Ted and Mary ordered meals costing a total of $30, including tax. They left an 18% tip. How much did they spend in all?

A $48.00

B $39.00

C $36.40

D $35.40