Answer:
function gcd(x,y) {
if (!y && !x) return 'None';
if (!y) return x;
return gcd(y, x%y);
}
console.log(gcd(462, 910));
console.log(gcd(0, 0));
console.log(gcd(32, 40));
Step-by-step explanation:
This example is in javascript.
6.3m questions
8.3m answers