用递归实现将输入小于32768的正整数按逆序输出。
# include<stdio.h>int reversed_order(int x, int n);
int main(int argc, char **argv) {
int n=32767;
printf("%2d", reversed_order(1, n));
return 0;
}
int reversed_order(int x, int n) {
if (n <= 0)
return 0;
else
return x + reversed_order(x, n - 1);
}
结果不正确,请各路大仙指教