Question: write code in Java Task 3: Loops public static int ged(int a, int b) Given two positive integers a and b, find and return the

write code in Java

write code in Java Task 3: Loops public static int ged(int a,

int b) Given two positive integers a and b, find and return

Task 3: Loops public static int ged(int a, int b) Given two positive integers a and b, find and return the greatest common divisor. This is the largest number that evenly divides both inputswith no remainder. (It cannot be larger than the smaller of the two numbers). public static int lcm(int a, int b) Given two positive integers a and b, find and return the least common multiple. This is the smallest number that can be divided by the two inputs evenly with no remainder. (It cannot be smaller than either of the two numbers) . Hint: the least common multiple can be calculated quickly as: 1cm(a, b) la*bl / gcd(a, b) = Manual Inspection Criteria(5%) Use the approach in the hint

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!