文件名称:Greatest-common-divisor-(GCD)
-
所属分类:
- 标签属性:
- 上传时间:2013-03-16
-
文件大小:3.08kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
用递归调用和辗转相除法求两个整数的最大公约数(输入多组数据,每个数在1到1000之间;输出为一行一个公约数)。-Calculate and output the greatest common divisor (GCD) of a pair of integers.The classic algorithm for computing the GCD, known as Euclid’s algorithm, goes as follows: Let m and n be variables containing the two numbers. If n is 0, then stop: m contains the GCD.Use recursion.(There will be multiple input sets. The line contains two integer between 1 and 1000. For each test case, output one line.)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Greatest common divisor (GCD).doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.