【C语言程序设计第四版】例10-3, 10-4代码
作者:互联网
#include <stdio.h> int gcd(int m, int n); void reverse(int num); int main(void){ int m, n; scanf("%d", &m); reverse(m); // scanf("%d%d",&m, &n); // printf("%d", gcd(m, n)); return 0; } int gcd(int m ,int n){ if (m % n == 0) { return n; }else{ return gcd(n, m%n); } } void reverse(int num){ if (num <= 9) { printf("%d", num); }else{ printf("%d", num%10); reverse(num /10); } }
标签:10,return,gcd,int,void,C语言,num,第四版,reverse 来源: https://www.cnblogs.com/sidianok/p/15316537.html