Monday, August 15, 2011
Write a program that implements the Euclidean Algorithm for finding the greatest common (GCD) of two given pos?
a program that implements the Eucalidean Algorithm for finding the greatest common divisor (GCD) of two given positive integers.This algorithm transform a pair of positive integers (m,n) into a pair (d,0) by repeatedly dividing the larger with the remainder.When the remainder is 0,the other intetger in the pair will be the greatest common divisor of the original pair (and all the intermediate pairs.)Required:Use functions-input(),gcd(),and display()&other functions that you believe are necessary(if there are).
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment