Question: Using Java Eclipse Problem 1[50 pts]: Write a program that prompts the user to enter two positive integers named a and b. Then, output the
Using Java Eclipse
![Using Java Eclipse Problem 1[50 pts]: Write a program that prompts the](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f2e2853f9c5_73266f2e28461881.jpg)
Problem 1[50 pts]: Write a program that prompts the user to enter two positive integers named a and b. Then, output the Bezout coefficients of a, b. Recall that the Bezout coefficients are (any) integers s, t such that: as + bt = gcd(a, b). Problem 2[50 pts]: Write a program that prompts the user to enter three positive integers a, b, n. Then, output the general form of solutions to the congruence equation arb (mod n) if there is such a solution. If there is no solution output "NO SOLUTION" For example, suppose l enter a 2 b 3, n 6 the output should be NO SOLUTION" If on the other hand, I enter a 2.b= 4,n = 6 then the general solution is r 2 (mod 3) so your program outputs r 2 (mod 3) Ffint: Recall that ue have seen hou to solve congruences take arleb (mod n) if geala, Clearly you can check if ged(a,n) 1 and if so you know what to do. If that is not the case hauerer, then first show that the equation has a solution iff db where d-gcd(a n) and in this case it is enough to solve the equation (a/d)(ba) nod (nld) Also conunce yourself uhy gcd a d,n/d) = 1 Not use hou, to solve congruences or the type you have seen m class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
