On vacation, Tim plans to spend less than $30 a day. If he spends $12 for food, what is the greatest number of dollars he can spend per day on other things? (Express in whole dollars.) Write an inequality and solve.