摘要: 1 #include 2 3 using namespace std; 4 5 //递归方法 6 int RGcd(int m, int n) 7 { 8 if(n>m) 9 swap(m,n);10 if(n==0)11 return m;12 else13 RGcd(n,m%n);14 }15 //迭代方法16 int RGcd(int m, int n)17 {18 if(n>m)19 swap(m,n);20 while... 阅读全文
posted @ 2013-08-23 17:48 倚天照花海 阅读(265) 评论(0) 推荐(0)