Question: PROGRAM SHOULD BE IN JAVA Input: Two integers a and b not both of them zero. Output: The GCD of a and b and integers

PROGRAM SHOULD BE IN JAVA

Input: Two integers "a" and "b" not both of them zero.

Output: The GCD of "a" and "b" and integers "s" and "t" such that

gcd(a,b)=a*s +b*t

1) Use the Extended Euclidean Algorithm.

2) Your program should work for negative numbers (Take the absolute value of inputs).

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!