Главная страница


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)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 Euclid\'s algorithm (finding the greatest common divisor of 2 numbers)   Karl Pech   19 Jun 2003 17:49:54 
 Re: Euclid\'s algorithm (finding the greatest common divisor of 2 number   Viktor Karev   20 Jun 2003 04:04:25 
 Re: Euclid\'s algorithm (finding the greatest common divisor of 2 number   Karl Pech   20 Jun 2003 18:19:19 
 Re: Euclid\'s algorithm (finding the greatest common divisor of 2 number   Viktor Karev   20 Jun 2003 13:59:54 
Архивное /ru.algorithms/7591b1ada483.html, оценка 1 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional