当前位置:网站首页>打印输出数(递归方法解决)
打印输出数(递归方法解决)
2022-06-27 13:09:00 【fitpolo】

#include <stdio.h>
void print_out(unsigned int n)
{
if ( n >= 10)
{
printf("-%01d\r\n",n/10);
print_out(n/10);
}
printf("%01d",n%10);
}
int main(int argc, char *argv[])
{
printf("Hello C-Free!\n");
print_out(12345);
printf("\n");
return 0;
}
运行结果如下:
边栏推荐
- 隐私计算FATE-离线预测
- Explore tidb lightning source code to solve the found bugs
- jvm 性能调优、监控工具 -- jps、jstack、jmap、jhat、jstat、hprof
- Bluetooth health management device based on stm32
- zabbix支持钉钉报警
- How to close windows defender Security Center
- Intranet learning notes (8)
- Realization of hospital medical record management system based on JSP
- Good luck today
- 基于STM32设计的蓝牙健康管理设备
猜你喜欢

Local visualization tool connects to redis of Alibaba cloud CentOS server

创建Deployment后,无法创建Pod问题处理

ThreadLocal 源码全详解(ThreadLocalMap)

printf不定长参数原理

Hue new account error reporting solution

AI for Science: scientific research paradigm, open source platform and industrial form

Three traversal methods of binary tree

Explore tidb lightning source code to solve the found bugs

Cloud native (30) | kubernetes' app store Helm

After 2 years of outsourcing, I finally landed! Record my ByteDance 3 rounds of interviews, hope to help you!
随机推荐
[weekly replay] the 81st biweekly match of leetcode
jvm 参数设置与分析
Implementation of recruitment website based on SSM
大小端字节序
Centos7命令行安装Oracle11g
TCP 流控问题两则
Istio微服务治理网格流量管理核心资源控制器详解
Details of istio micro service governance grid traffic management core resource controller
7 killer JS lines of code
Threejs' ambient light + point light + parallel light + spherical light and Hepler understanding + shadow ()
关于接口测试自动化的总结与思考
Using FRP tool to realize intranet penetration
今天运气不错
Two TCP flow control problems
Clear self orientation
Explore tidb lightning source code to solve the found bugs
Bluetooth health management device based on stm32
一道shell脚本的统计题
Ali an interview question: use two threads to output letters and numbers alternately
scrapy