当前位置:网站首页>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;
}边栏推荐
猜你喜欢

清甜女孩李斯霞 受邀担任第六季完美童模全球总决赛小主持人

通俗易懂C语言关键字static

biggan:large scale gan training for high fidelity natural image synthesis

Simple making of master seal

20. Hough line transformation

热血男孩滕文泽 受邀担任第六季完美童模全球总决赛形象大使

丨EGFR FISH 探针解决方案

GNN (graph neural network) introduction vernacular

GUN make (2) 总述

论文阅读 Exploring Temporal Information for Dynamic Network Embedding
随机推荐
Is it safe to log in the stock account on the flush? How to open a stock account in the flush
弹性蛋白酶的用途和化学性质
蒟蒻初学单片机的一丢丢笔记
26. histogram back projection
Summary of informer's paper
recv & send
PTA class a simulated third bomb: 1140-1143
分布式系统(二)分布式事务的理解
Rollback Protection
Distributed systems (II) understanding of distributed transactions
ActivityManager kill reason
Exploring temporary information for dynamic network embedding
代码覆盖率测试(一)
丨EGFR FISH 探针解决方案
leetcode 300. Longest increasing subsequence (medium)
Operation of simulated examination platform for electrical test questions in 2022
Focal loss
关于strlen与sizeof的区别
Sweet girl lisixia was invited to be the little host of the global finals of the sixth season perfect child model
Textcnn paper Interpretation -- revolutionary neural networks for sense classification