当前位置:网站首页>递归调用实现打印一个整数的每一位
递归调用实现打印一个整数的每一位
2022-07-25 08:22:00 【p29949】
#include<stdio.h>
//void dayin( int k)
//{
// if (k < 10)
// printf("%d ", k);
// else
// { dayin(k / 10);
// printf("%d ", k%10);
//}
void dayin(int k)
{
if (k > 9)
{
dayin( k / 10);
}
printf("%d ", k%10);
}
int main()
{
int i=0;
scanf("%d", &i);
dayin(i);
return 0;
}
边栏推荐
- R language error
- Interview questions: common faults and occurrence scenarios of redis
- Database persistence +jdbc database connection
- 滴滴 - dispatching
- CAS操作
- node+js搭建时间服务器
- Raspberry pie 4B parsing PWM
- IP command usage details
- Programmers can't play at the age of 35. Is it a fact or a misunderstanding?
- Brush the title "sword finger offer" day01
猜你喜欢

【黑马程序员】Redis学习笔记004:主从复制+哨兵模式+集群

Idea failed to start the project yamlexception Chinese file encoding format

Online bookstore system based on jsp+servlet+mysql

Use of lambdaquerywrapper, lambdaupdatewrapper, lambdaquerychainwrapper

efcore在Saas系统下多租户零脚本分表分库读写分离解决方案

【着色器实现Shadow投影效果_Shader效果第八篇】

Data warehouse ODS, DWD floor, 220616, HM,

CentOS 8.2 MySQL installation (xshell6)

一次简单的SQL注入靶场练习

Vscode remote connection server, switch to go version
随机推荐
Implementation of depth first and breadth first traversal of binary tree
Ensembles in RNA counts data in TCGA_ ID to gene_ Method of ID
Summary of SQL skills in data warehouse development
Test the mock data method of knowing and knowing
R language error
C # introductory series (30) -- exception handling
Vscode remote connection server, switch to go version
CAS operation
"Unable to recognize" yarn "item as cmdlet, function, script file
Advanced C language (XII) - dynamic memory management
哈希表刷题(上)
Advanced C language (11) - user defined data types
Node+js build time server
Chapter 3 business function development (realize the real-time response of the select all button)
Install MySQL 8.0 using docker
Advanced C language (XIII) - Example Analysis of dynamic memory management
Technical Analysis | Doris connector combined with Flink CDC to achieve accurate access to MySQL database and table exactly once
Brush the title "sword finger offer" day02
Database query optimization
Hotel room management system based on jsp+servlet+mysql