To find out how many yogurt cups Mary sold, you can calculate \( \frac{5}{8} \) of the 40 cups.
First, multiply the total number of cups by \( \frac{5}{8} \):
\[ \text{Number of cups sold} = 40 \times \frac{5}{8} \]
Now, perform the multiplication:
\[ 40 \times \frac{5}{8} = \frac{40 \times 5}{8} = \frac{200}{8} = 25 \]
So, Mary sold 25 yogurt cups.