Question: Please code in R. 1: Greatest Common Divisor (GCD) Please write a function, ged(), which takes two positive integers a, b and calculates their greatest

Please code in R.
1: Greatest Common Divisor (GCD) Please write a function, ged(), which takes two positive integers a, b and calculates their greatest common divisor (GCD) using the Euclidean algorithm. The Euclidean Algorithm Example: Let a = 180 and b = 25 1. calculate 180/25, and get the result 7 with remainder 30, so 180 = 7 * 25 +5. 2. calculate 25/5, and get the result 5 with remainder 15, so 25 = 5 x 5 +0. 3. the greatest common divisor of 180 and 25 is 5. Based on your god(), please write another function, which takes three positive integers and returns their GCD
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
