算法
nethub2
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
求2个数的最大公约数 - 轮除法
求2个数的最大公约数 - 轮除法public class C1{ public int getCommonDivisior(int a, int b){ int temp; if(a<=b){ temp = b; b = a; a = temp; } while (b!=0){ temp = a%b; a=b; b...原创 2013-12-10 16:27:18 · 271 阅读 · 0 评论 -
求2个数的最大公约数 - 递归+除法
public class Test { /** * @param args */ public static void main(String[] args) { getLowestTerms(12,28); } public static void getLowestTerms(int a, int b){ System.out.print...原创 2013-12-10 16:47:01 · 217 阅读 · 0 评论
分享