当前位置:网站首页>Reverse output an integer
Reverse output an integer
2022-06-26 01:49:00 【So it is^^】
thought : First %10 Find the last one and print it out , In addition 10 Remove the last digit , Yu Yu 10 Print this loop
#include<stdio.h>
int main()
{
int n = 0;
scanf("%d", &n);
int a = 0, b = 0,i=0;
while (n) //n The last digit is divided by 10 be equal to 0 For false , Exit loop
{
i++;
printf("%d", n % 10); // Print out the last bit
n = n / 10; // After printing the last digit, i 10 Find the next , The last digit is divided by 10 be equal to 0
}
return 0;
}边栏推荐
- 蒟蒻初学单片机的一丢丢笔记
- 论文阅读 Exploring Temporal Information for Dynamic Network Embedding
- readv & writev
- Playful girl wangyixuan was invited to serve as the Promotion Ambassador for the global finals of the sixth season perfect children's model
- 木瓜蛋白酶的特点及相关特异性介绍
- 25. histogram comparison
- Wechat circle of friends test point
- Redis的使用
- Postman断言对应脚本的解释
- Sunshine boy chenhaotian was invited to be the spokesperson for the global finals of the sixth season perfect children's model
猜你喜欢

28. contour discovery

CYCA少儿形体礼仪 乐清市培训成果考核圆满落幕

Obtain WiFi password through computer (only connected WiFi)

Sunshine boy chenhaotian was invited to be the spokesperson for the global finals of the sixth season perfect children's model

Make a row of the dataframe a column name

20. Hough line transformation

The answer skills and examples of practical cases of the second construction company are full of essence

Exploring temporary information for dynamic network embedding

recvmsg & sendmsg

Show spirit chenzitong was invited to be the chief experience officer of the global finals of the sixth season perfect children's model
随机推荐
Perfdog
浅谈接口测试(一)
前置++,后置++与前置--与后置--(++a,a++与--a,a--)
从在浏览器的输入框输入一个网址,到看到网页的内容,这个过程中发生了什么?
俏皮少女王艺璇 受邀担任第六季完美童模全球总决赛推广大使
PTA class a simulated ninth bullet: 1114-1117
[visual studio code] vscode shortcut keys
wifi 相关知识详解
Brief introduction to the usage of iloc in dataframe
App test (I)
元素定位的八大法则
Xiaomi tablet 5 Pro unlock bootloader
论文阅读 Exploring Temporal Information for Dynamic Network Embedding
正则表达式
物联网亿万级通信一站式解决方案EMQ
easyexcel读取文件
Common deep learning optimizers
Focal loss
王老吉药业“关爱烈日下最可爱的人”公益活动在杭启动
关于strlen与sizeof的区别