Here's what I got!
public static long gcd ( long a , long b ) {
if (a < b) return gcd ( b , a ) ;
// a >= b
if (b == 0) return a ;
if (a%2 == 0 && b%2 ==0) {
return...
Type: Posts; User: EDale
Here's what I got!
public static long gcd ( long a , long b ) {
if (a < b) return gcd ( b , a ) ;
// a >= b
if (b == 0) return a ;
if (a%2 == 0 && b%2 ==0) {
return...
Thanks so much! I'll post my solution when I figure it out!
I have this homework question and I'm not 100% sure what it's asking. Could you break it down for me or write the skeleton code so I can get a better grasp of it?
Write an alternative gcd...