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
Get step-by-step solutions from verified subject matter experts
