摘要:
实现进制转换的伪代码 Write "Enter the new base" Read newBase Write "Enter the number to be converted" Read decimalNumber Set quotient to 1 WHILE (quotient is no 阅读全文
摘要:
欧基米德算法 方法1:辗转相除法(欧几里得算法) 欧几里德算法又称辗转相除法,用于计算两个整数a,b的最大公约数。其计算原理依赖于下面的定理: 定理:gcd(a,b) = gcd(b,a mod b)证明:a可以表示成a = kb + r,则r = a mod b 假设d是a,b的一个公约数,则有 阅读全文