The revenue from selling x hats is r(x)=18x The cost of buying x hats is c(x)=8x+30. The profit from selling x hats is p(x)=r(x)-c(x)
Write a function for p(x), the profit from selling x hats
