Question: Write a progeam gcd.py that takes two integers x and y as command-line arguments and writes their greates common divior (gcd) computed using Euclid's Algorithm:
Write a progeam gcd.py that takes two integers x and y as command-line arguments and writes their greates common divior (gcd) computed using Euclid's Algorithm: if y divides x, the gcd of x and y s y; otherwise, the gcd of x and y isthe same as the gcd of y and x mod y.
$ python gcd.py 54 24 6 $ python gcd.py 22 45 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
