Question: Use Euclid's Algorithm given below to determine the LCM and HCF for given two integer numbers. Take in as input two numbers A and B.
Use Euclid's Algorithm given below to determine the LCM and HCF for given two integer numbers. Take in as input two numbers A and B. Subtract the smaller of the two numbers from the Larger Number and assign the answer to the larger number. The above process is repeated until both the numbers are equal, say X. Apparently, the residual number (X) that we have obtained is the HCF. LCM could then be computed using the formula (A*B)/HCF
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
