当前位置:网站首页>反向输出一个整数
反向输出一个整数
2022-06-26 00:13:00 【原来是这样^^】
思想:先%10找最后一位并打印下来,在除10将最后一位剔除,在余10打印以此循环
#include<stdio.h>
int main()
{
int n = 0;
scanf("%d", &n);
int a = 0, b = 0,i=0;
while (n) //n最后一位除10等于0为假,退出循环
{
i++;
printf("%d", n % 10); //将最后一位打印出来
n = n / 10; //打印完最后一位余10找到下一位,最后一位除10等于0
}
return 0;
}
边栏推荐
- 21. Hoff circle transformation
- Several methods of JQ obtaining objects
- 木瓜蛋白酶的特点及相关特异性介绍
- OTA trigger
- 2022 Anhui province safety officer C certificate examination practice questions simulated examination platform operation
- PTA class a simulation bomb 10: 1119-1123
- Viwi interface
- Installing MySQL databases in FreeBSD
- 论文阅读 Exploring Temporal Information for Dynamic Network Embedding
- GUN make (7) 执行make
猜你喜欢
丨EGFR FISH 探针解决方案
Obtain WiFi password through computer (only connected WiFi)
Quickly generate 1~20 natural numbers and easily copy
Make a row of the dataframe a column name
Assertion of postman interface test
tos cos dscp 区别和作用
Principle of voice wake-up
cyclegan:unpaired image-to-image translation using cycle-consistent adversarial network
Simple making of master seal
One stop solution EMQ for hundreds of millions of communication of Internet of things
随机推荐
缓冲
How to search papers in a certain field
Shell regular expression
Abnova丨CMV CISH 探头解决方案
JQ 自定义属性取值
Brief introduction to the usage of iloc in dataframe
Procédure de désinstallation complète de la base de données Oracle (pas de capture d'écran)
GUN make (7) 执行make
Assertion of postman interface test
biggan:large scale gan training for high fidelity natural image synthesis
27. template match
2021-1-15 摸魚做的筆記Ctrl+c /v來的
Redis的使用
Summary of knowledge points of catboost
APP测试(一)
cyclegan:unpaired image-to-image translation using cycle-consistent adversarial network
Interpretation of script corresponding to postman assertion
俏皮少女王艺璇 受邀担任第六季完美童模全球总决赛推广大使
easyexcel读取文件
makefile 中export set ENV 的区别和作用