cex8_17.cpp
来自「用C语言编写的谭号强课后习题的部分解答」· C++ 代码 · 共 31 行
CPP
31 行
/**********************
使用递归函数实现习题8.17
************************/
#include <stdio.h>
void main()
{int n;
scanf("%d" ,&n);
Inttostr1(n);
Inttostr2(n);
}
/*********************
正序输出函数
*********************/
Inttostr1(int n)
{if(n)
{ Inttostr(n/10);
putchar(n%10+'0'); }
}
/*********************
逆序输出函数
*********************/
Inttostr2(int n)
{if(n)
{
putchar(n%10+'0');
Inttostr(n/10); }
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?