C语言实验——逆置正整数
2017-12-28 19:57
751 查看
C语言实验——逆置正整数
Time Limit: 1000MS Memory Limit: 65536KBSubmit Statistic
Problem Description
输入一个三位正整数,将它反向输出。
Input
3位正整数。
Output
逆置后的正整数。
Example Input
123
Example Output
321
Hint
注意130逆置后是31
Author
crq#include <stdio.h>
int main()
{
int x,a,b,c;
4000
scanf("%d",&x);
c=x%10;
b=(x/10)%10;
a=x/100;
printf("%d\n",c*100+b*10+a);
return 0;
}
相关文章推荐
- C语言实验——逆置正整数
- C语言实验——逆置正整数
- C语言 链表 数据结构实验之链表三:链表的逆置
- oj2010: C语言实验——逆置正整数
- C语言实验——逆置正整数
- C语言实验——逆置正整数
- 数据结构实验之链表三:链表的逆置 (SDUT 2118)
- C语言 数据结构排序与查找 数据结构实验之排序五:归并求逆序数
- 数据结构实验之链表三:链表的逆置
- C语言 数据结构之 二叉树 数据结构实验之二叉树七:叶子问题
- c语言:创建一个数组,分别实现函数初始化数组、 清空数组、数组元素的逆置
- C语言实验——保留字母
- 关于文件内容行逆置问题(c语言)
- 实验 2 用C语言编写简单程序
- UNIX-LINUX C语言编程->实验室->多次打开文件实验
- 文章标题 C语言实现单链表之逆置和逆序打印
- (数据结构排序的实验四)快速,冒泡,简单选择,直接插入排序的c语言实现!!
- C语言实验——计算A+B(顺序结构)
- C语言实验——打印金字塔
- C语言实验——打印数字图形