|
|
ru.algorithms- RU.ALGORITHMS ---------------------------------------------------------------- From : Karl Pech 2:5020/400 19 Jun 2003 17:49:54 To : All Subject : Euclid's algorithm (finding the greatest common divisor of 2 numbers) --------------------------------------------------------------------------------
Hello everybody,
I'm currently trying to understand this algorithm.
I know how it works but I don't understand why
it works.
What is the general idea/concept of this algorithm?
Just in case somebody wants to know how it works:
Input: Numbers a, b
while (a > 0)
{
if (a < b)
{
exchange_values(a,b)
}
a = a-b;
}
return b;
Thank you very much!
[P.S. You can answer me in Russian!
I will understand it!]
--- ifmail v.2.15dev5
* Origin: Gamma NNTP server Moscow Russia (2:5020/400)
Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.algorithms/7591b1ada483.html, оценка из 5, голосов 10
|