当前位置:网站首页>Zzuli:1060 numbers in reverse order
Zzuli:1060 numbers in reverse order
2022-07-02 05:29:00 【Don't explode】
Title Description
Enter a positive integer , Output it in reverse order , There is a space after each number .
Input
Enter a positive integer n, You can assume n stay int Within the scope of
Output
take n Output in reverse order , There is a space after each number , Output takes up one line . for example , Input 12354, Output 4 5 3 2 1
The sample input Copy
12354
Sample output Copy
4 5 3 2 1
Tips
Integers n Yes 10 Take a module to get a number on a bit , And using the characteristic that integer quotient is integer , Integers n Divide 10 My business is just right “ Throw away ” A digit number
#include <stdio.h>
int main()
{
int i;
int n;
scanf("%d",&n);
int num;
for(i=0;;i++)
{
num=n%10;
n/=10;
printf("%d ",num);
if(n<1)
break;
}
return 0;
}边栏推荐
- Online English teaching app open source platform (customized)
- Briefly introduce chown command
- Résumé de la collection de plug - ins couramment utilisée dans les outils de développement idea
- 线程池批量处理数据
- Gee: analyze the change of spatial centroid of remote sensing image [centroid acquisition analysis]
- Detailed explanation of Pointer use
- Essence and physical meaning of convolution (deep and brief understanding)
- idea開發工具常用的插件合集匯總
- Fabric.js IText 手动设置斜体
- 线程池概述
猜你喜欢

视差特效的原理和实现方法

el form 表单validate成功后没有执行逻辑

Fabric.js 精简JSON

Appnuim environment configuration and basic knowledge

Gee series: Unit 4 data import and export in Google Earth engine

Fabric.js IText设置指定文字的颜色和背景色

Fabric.js 右键菜单

Detailed explanation of Pointer use

Ls1046nfs mount file system

Pyechart1.19 national air quality exhibition
随机推荐
Get the details of the next largest number
指针使用详解
记录sentry的踩坑之路
Gee series: unit 9 generate sampling data in GEE [random sampling]
Gee: remote sensing image composite and mosaic
7.1 Résumé du concours de simulation
Basic use of form
在线音乐播放器app
Collectors. Groupingby sort
Database batch insert data
Gee: find the spatial distribution and corresponding time of the "greenest" in the Yellow River Basin in 2020 [pixel by pixel analysis]
Storage of data
Pycharm breakpoint management: temporarily cancel some breakpoints + run directly to a line
Simply encapsulate JS and apply it
Latest: the list of universities and disciplines for the second round of "double first-class" construction was announced
线程池批量处理数据
Straighten elements (with transition animation)
Determine whether there is an element in the string type
Global and Chinese market of hydrocyclone desander 2022-2028: Research Report on technology, participants, trends, market size and share
idea开发工具常用的插件合集汇总