A firm's price–demand relation is p=50−2x, where p is the price (in rupees) per unit and x is the number of units sold. The total cost of producing x units is C(x)=10x+80 rupees. The profit is maximum when the firm sells
a) 12 units
b) 10 units
c) 20 units
d) 8 units