In planning a restaurant, it is estimated that a profit of $6 per seat will be made if the number of seats is no more than 50, inclusive. On the other hand, the profit on each seat will decrease by 10cents for each seat above 50.

Find the number of seats that will produce the maximum profit.

My problem is that I am stuck on making a function from this word problem. I understand how to find the maximum profit, but without a function, I cannot do it! : (

Anybody know the function to this problem?