C++ question...Given positive two integers m and n such that m<n, the greatest c
ID: 3567247 • Letter: C
Question
C++ question...Given positive two integers m and n such that m<n, the greatest common divisor of m and n is the same as the greatest common divisor of m and (n-m). Use this fact to write a recursive definition of the function "greatest_common_divisor(...)", which takes two positive integer arguments and returns their greatest common divisor. Test your function in a suitable main program. Hint: Use While conditions until one number becomes 0.C++ question...Given positive two integers m and n such that m<n, the greatest common divisor of m and n is the same as the greatest common divisor of m and (n-m). Use this fact to write a recursive definition of the function "greatest_common_divisor(...)", which takes two positive integer arguments and returns their greatest common divisor. Test your function in a suitable main program. Hint: Use While conditions until one number becomes 0.
C++ question...Given positive two integers m and n such that m<n, the greatest common divisor of m and n is the same as the greatest common divisor of m and (n-m). Use this fact to write a recursive definition of the function "greatest_common_divisor(...)", which takes two positive integer arguments and returns their greatest common divisor. Test your function in a suitable main program. Hint: Use While conditions until one number becomes 0.