当前位置:网站首页>Exercise 10-8 recursive implementation of sequential output of integers
Exercise 10-8 recursive implementation of sequential output of integers
2022-07-03 14:09:00 【ᯤ⁹ᴳ⁺ ·】
exercises 10-8 Recursive implementation sequentially outputs integers (15 branch )
This question requests to realize a function , Output an integer in bit order .
Function interface definition :
void printdigits( int n );
function printdigits
Should be n
Each digit of the is printed in order from high to low , Each number is on one line .
Sample referee test procedure :
#include <stdio.h>
void printdigits( int n );
int main()
{
int n;
scanf("%d", &n);
printdigits(n);
return 0;
}
/* Your code will be embedded here */
sample input :
12345
sample output :
1
2
3
4
5
void printdigits( int n ){
if(n/10>0){
printdigits(n/10);
}
printf("%d\n",n%10);
}
边栏推荐
- selenium 浏览器(1)
- Why are grass-roots colleges and universities with "soil and poverty" called "Northeast small Tsinghua"?
- Folic acid modified metal organic framework (zif-8) baicalin loaded metal organic framework composite magnetic material (AU- [email
- Exercise 6-2 using functions to sum special A-string sequences
- Go language web development series 25: Gin framework: using MD5 to verify the signature for the interface station
- GoLand 2021.2 configure go (go1.17.6)
- Go language web development series 29: Gin framework uses gin contrib / sessions library to manage sessions (based on cookies)
- simpleParallax. JS (create poor visual effects for website pictures)
- TS code automatically generates JS
- Go language web development series 30: gin: grouping by version for routing
猜你喜欢
QT learning 21 standard dialog box in QT (Part 2)
Qt学习23 布局管理器(二)
八大排序
jvm-类加载
Comprehensive case of MySQL data addition, deletion, modification and query
JS matrix zero
concat和concat_ws()区别及group_concat()和repeat()函数的使用
QT learning 20 standard dialog box in QT (middle)
FPGA test method takes mentor tool as an example
Another industry has been broken by Chinese chips. No wonder the leading analog chip companies in the United States have cut prices and sold off
随机推荐
JS continues to explore...
QT learning 22 layout manager (I)
Spring cup eight school league
Another industry has been broken by Chinese chips. No wonder the leading analog chip companies in the United States have cut prices and sold off
Global event bus
Fabric. JS document
Common mixins
Back to top implementation
Onmenusharetimeline custom shared content is invalid, and the title and icon are not displayed
金属有机骨架MOFs装载非甾体类抗炎药物|ZIF-8包裹普鲁士蓝负载槲皮素(制备方法)
Uio-66-cooh loaded bendamostine | hydroxyapatite (HA) coated MIL-53 (FE) nanoparticles | baicalin loaded manganese based metal organic skeleton material
selenium 浏览器(1)
八大排序
Common plug-ins for vite project development
Similarities and differences of sessionstorage, localstorage and cookies
Example analysis of QT learning 18 login dialog box
金属有机骨架材料ZIF-8包载姜黄素([email protected]纳米颗粒)|纳米金属有机框架搭载雷帕霉素|科研试剂
怎样删除对象的某个属性或⽅法
[ACNOI2022]猜数
7-7 12-24 hour system