//非递归形式 void gcl(int m,int n){ int max,min,remainder; max = m > n ? m : n; min = m < n ? m : n; do{ remainder = max % min ; max = min; min = remainder; }while(remainder != 0) ; printf("%d",max); } //递归形式 int gcd(int a,int b){ if(b == 0){ return a; }else{ return gcd(b,a % b); } }