摘要
在求两个数的最大公约数算法的基础上,研究了求多个数的最大公约数的算法,并利用C语言实现了枚举法、辗转相除法和更相减损术三种算法的程序设计。
Based on the algorithm to calculate the greatest common divisor of two numbers, the algorithm to calculate the greatest common divisor of multiple numbers is studied in this paper. C language is used to realize the design of enumeration method, Euclid's algorithm and loss-reducing technique.
出处
《计算机时代》
2012年第6期21-22,24,共3页
Computer Era
关键词
最大公约数
枚举法
辗转相除法
更相减损术
greatest common divisor
enumeration method
Euclid' s algorithm
loss-reducing technique