【HUSTOJ】1007: 倒序输出

来源:互联网 发布:php带采集小说系统 编辑:程序博客网 时间:2024/04/29 01:30

1007: 倒序输出

Time Limit: 1 Sec  Memory Limit:128 MB
Submit: 228  Solved: 182

原题链接

Description

任意读入一个四位整数,颠倒后输出。

Input

输入一行,只有一个整数x(1000<=x<=9999)。

Output

输出只有一行,包括1个整数。

Sample Input

4789

Sample Output

9874

HINT

Source


#include<iostream>using namespace std;int main(){int x;cin>>x;cout<<x%10<<x/10%10<<x/100%10<<x/1000<<endl;return 0;}

这么水?。。。好吧,,谁叫我好呢。

0 0
原创粉丝点击