当前位置:网站首页>递归调用实现打印一个整数的每一位
递归调用实现打印一个整数的每一位
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;
}
边栏推荐
猜你喜欢

Advanced C language (11) - user defined data types

Raspberry pie 4B parsing PWM
![RTOS系列(13):汇编LDR指令、LDR伪指令、[Rn]寄存器间接引用 详细解析](/img/87/d116e729c771fcf3ce95958a45d85f.png)
RTOS系列(13):汇编LDR指令、LDR伪指令、[Rn]寄存器间接引用 详细解析

475-82(230、43、78、79、213、198、1143)

How to set up a personal website for free

Data warehouse ODS, DWD floor, 220616, HM,

刷题《剑指Offer》day02

Refreshing mobile terminal personal center page

DIY can decorate the mall system, you can also have!

Raspberrypico analytic PWM
随机推荐
Brush the title "sword finger offer" day02
Raspberry pie 3b ffmpeg RTMP streaming
JVM specification Oracle official website
滴滴 - eta(Estimate the Travel Time)
刷题《剑指Offer》day02
Raspberrypico analytic PWM
【5G NR】UE注册拒绝原因
CAS operation
Chapter 3 business function development (query clues)
Niuke dynamic planning training
Message Oriented Middleware
7.24模拟赛总结
滴滴 - dispatching
Ensembles in RNA counts data in TCGA_ ID to gene_ Method of ID
[ffmpeg] MP4 to YUV
Learn when playing No 4 | can you take an online exam in programming? Right here →
Redis fragment cluster
Didi eta (estimate the travel time)
Advanced C language (XII) - dynamic memory management
Common commands of raspberry pie