Ask your own question, for FREE!
Mathematics 8 Online
OpenStudy (anonymous):

In what ways can we extend euclid's algorithm?

OpenStudy (anonymous):

int euclidgcd(int m, int n) { int remainder; /* Make sure m or n are positive integers. If either m or n is equal to zero, return the non-zero integer, or return zero if both m and n are zero. */ if ((m < 0 ? (m = -m) : m) == 0 || (n < 0 ? (n = -n) : n) == 0) { return m == 0 ? n : n == 0 ? m : 0; } /* Make sure m is always greater than or equal to n. */ if (m < n) { int temp; temp = m; m = n; n = temp; } /* Divide m by n and compute the remainder. If the remainder is not equal to zero, do the following in order: 1. Assign m the value of n. 2. Assign n the value of remainder. 3. Repeat the entire process until a remainder of zero is reached. Finally, return n as the greatest common denominator of m and n. */ while ((remainder = m % n)) { m = n; n = remainder; } return n; }

jhonyy9 (jhonyy9):

nice very !!!

jhonyy9 (jhonyy9):

- so now i have learned on wikipedia - check it please you too - very very interesting and understandably - i think !!!

jhonyy9 (jhonyy9):

Thank you very much for this subject !!!

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!