1 #include <stdio.h> 2 3 int fun(int m,int n) 4 { 5 if(m%n==0) 6 return n; 7 return fun(n,m%n); 8 } 9 10 int main(void) 11 { 12 printf("%d\n",fun(18,14)); 13 getchar(); 14 return 0; 15 }
1 #include <stdio.h> 2 3 int fun(int m,int n) 4 { 5 if(m%n==0) 6 return n; 7 return fun(n,m%n); 8 } 9 10 int main(void) 11 { 12 printf("%d\n",fun(18,14)); 13 getchar(); 14 return 0; 15 }