8与7之间的公约数
15/7=2.....1
7/1=7....0
公约数是1
public static int Gmc(int a, int b) { int tmpe=0; while (b != 0) { tmpe = a % b; a = b; b = tmpe; } return a; }
本文来自博客园,作者:阿霖找BUG,转载请注明原文链接:https://www.cnblogs.com/lin-07/p/17583836.html