Lincoln School is raising money for a class trip by setting magazines. The school receives a percentage of each participant's sales based on a 3-tier schedule as follows:
30% for the first $50 of each participant's sales
40% for the next 450 of each participant's sales
50% for all additional sales
Cody participated in the fund-raiser and had magazine sales of $140. How much did Cody earn for school?