Since one of the angles is 45 degrees, we can set up an equation to find the length of one of the legs.
sin45 = x / 18
x = 18sin45
x = 12.727 cm
Or you can just do 18 / √2 = 12.727
This is because 45-45-90 triangle for the sides is a, a, a√2. Hypotenuse is a√2 so that’s why we solved it as a√2 = 18 where
a = 12.727