Question: Use thAlgorithm to calculate g c d ( a , b ) Input: positive integers a and b Output: g c d ( a ,

Use thAlgorithm to calculate gcd(a,b)
Input: positive integers a and b
Output: gcd(a,b)
gcd(a,b)
xlarra
ylarrb
while y0 do
rlarrxnody
xlarry
ylarrr
exumple:
a=18,b=14
return xe gcd algorithm discussed in class (Lecture 16 notes) to determine the ged of
the following pairs of integers. Show your work for how you determined the ged
using this method by writing out a trace table when executing the algorithm.
a.35 and 98
b.95 and 153
 Use thAlgorithm to calculate gcd(a,b) Input: positive integers a and b

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!