The volume \( V \) of a frustum of a cone is given by the formula:
\[
V = \frac{1}{3} \pi h \left( r_1^2 + r_2^2 + r_1 r_2 \right),
\]
where:
- \( h = 24 \, \text{cm} \) is the height,
- \( r_1 = 20 \, \text{cm} \) is the radius of the upper end,
- \( r_2 = 8 \, \text{cm} \) is the radius of the lower end.
Substitute the given values into the formula:
\[
V = \frac{1}{3} \times 3.14 \times 24 \left( 20^2 + 8^2 + 20 \times 8 \right).
\]
Simplify:
\[
V = \frac{1}{3} \times 3.14 \times 24 \left( 400 + 64 + 160 \right) = \frac{1}{3} \times 3.14 \times 24 \times 624.
\]
\[
V = \frac{1}{3} \times 3.14 \times 14976 = 15792.48 \, \text{cm}^3.
\]
Since 1 litre = 1000 cm³, the volume in litres is:
\[
\text{Volume in litres} = \frac{15792.48}{1000} = 15.79248 \, \text{litres}.
\]
The cost of the milk is:
\[
\text{Cost} = 40 \times 15.79248 = 631.6992 \, \text{rupees}.
\]
Thus, the cost of the milk is approximately \( \text{Rs.} 631.70 \).
Conclusion:
The cost of milk to completely fill the container is approximately \( \text{Rs.} 631.70 \).