当前位置:网站首页>打印输出数(递归方法解决)
打印输出数(递归方法解决)
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;
}
运行结果如下:
边栏推荐
- AGCO AI frontier promotion (6.27)
- L June training (day 27) - figure
- jvm 性能调优、监控工具 -- jps、jstack、jmap、jhat、jstat、hprof
- Istio微服务治理网格流量管理核心资源控制器详解
- How to choose LAN instant messaging software
- Configuration management center of microservices
- MySQL 索引及其分类
- Journal quotidien des questions (6)
- [day 27] given an integer n, print out the full permutation from 1 to n | Full Permutation template
- 创建Deployment后,无法创建Pod问题处理
猜你喜欢
Kotlin函数使用示例教程

Esp32s3 iperf routine test esp32s3 throughput test

Teach you how to build a permanent personal server!

Size end byte order

AGCO AI frontier promotion (6.27)

Airbnb复盘微服务

After 2 years of outsourcing, I finally landed! Record my ByteDance 3 rounds of interviews, hope to help you!

Convn-n dimensional convolution

ThreadLocal 源码全详解(ThreadLocalMap)

Explore tidb lightning source code to solve the found bugs
随机推荐
After 2 years of outsourcing, I finally landed! Record my ByteDance 3 rounds of interviews, hope to help you!
Openhgnn releases version 0.3
Record number of visits yesterday
诗歌一首看看
[acwing] explanation of the 57th weekly competition
Airbnb复盘微服务
思考的角度的差异
Summary of redis master-slave replication principle
内网学习笔记(8)
硬件开发笔记(七): 硬件开发基本流程,制作一个USB转RS232的模块(六):创建0603封装并关联原理图元器件
scrapy
【Acwing】第57场周赛 题解
[day 27] given an integer n, print out the full permutation from 1 to n | Full Permutation template
socket阻塞和非阻塞模式
Firewall foundation Huawei H3C firewall web page login
Ali an interview question: use two threads to output letters and numbers alternately
【第27天】给定一个整数 n ,打印出1到n的全排列 | 全排列模板
Failed to execute NPM instruction, prompting ssh: Permission denied
Deploy redis sentinel mode using bitnamiredis Sentinel
[medical segmentation] unet3+