Wendy bought 7 bags each bag costs the same amount. She paid 100 and received g dollars as change. what was the cost of each bag in terms of g?