In a 45-45-90 triangle, the relationship between the lengths of the legs and the hypotenuse is as follows:
If the length of each leg is \( x \), then the hypotenuse is \( x\sqrt{2} \).
Given that the hypotenuse is 4 cm, we can set up the equation:
\[ x\sqrt{2} = 4 \]
To find the length of the leg \( x \), we can divide both sides by \( \sqrt{2} \):
\[ x = \frac{4}{\sqrt{2}} \]
To simplify \( \frac{4}{\sqrt{2}} \), we can rationalize the denominator:
\[ x = \frac{4\sqrt{2}}{2} = 2\sqrt{2} \]
Therefore, the length of each leg of the triangle is \( 2\sqrt{2} \) cm.
The answer is \( 2\sqrt{2} \).