October 6, 2023
October 6, 2023
October 6, 2023
###### Programming-for-Output-Problems
October 6, 2023
 Question 31
Assume A and B are non zero positive integers. The following code segment

 A Computes the LCM of two numbers B Divides the larger number by the smaller number C Computes the GCD of two numbers D Finds the smaller of two numbers
Question 31 Explanation:
→ The above iterative code is computes the GCD of two numbers using euclidean algorithm.
→ The procedure is to subtract smaller number from larger. So that we can reduce larger number then doesn’t change the value of GCD.
→ if we performing number of iterations based on condition the larger of two numbers will end up with GCD.
Question 31 Explanation:
→ The above iterative code is computes the GCD of two numbers using euclidean algorithm.
→ The procedure is to subtract smaller number from larger. So that we can reduce larger number then doesn’t change the value of GCD.
→ if we performing number of iterations based on condition the larger of two numbers will end up with GCD.