嵌套函数的例子

使用函数输出一个整数的逆序数:

int reverse(int n) { static int a; if(n) { a=a*10+n%10; reverse(n/10); } return a; }