Ответ:

Найдём \(\frac{5}{8}\) от 40:

\(40 \cdot \frac{5}{8} = 5 \cdot 5 = 25\).

Ответ: 25 конфет.