A local bakery sells cupcakes and cookies. Each cupcake costs $3, and each cookie costs $2. If the total revenue from selling 50 items is $140, how many cupcakes were sold?
Let the number of cupcakes sold be represented by the variable $c$ and the number of cookies sold be represented by the variable $k$. You can set up the following equations based on the information provided:
1. The total number of items equation: $$c + k = 50$$
2. The total revenue equation: $$3c + 2k = 140$$