The drawing below gives an idea of how to cut a given "true" rectangle into squares ("true" rectangle meaning that the two dimensions are different).
Can you translate this drawing into an algorithm?
You will be given two dimensions
a positive integer length (parameter named lng
)
a positive integer width (parameter named wdth
)