1 int fun(int a, int b) { 2 while (b != 0) { 3 int remainder = a % b; 4 a = b; 5 b = remainder; 6 } 7 return a; 8 }
求两数的最大公约数
原文:https://www.cnblogs.com/moujun1001/p/9615767.html