1007: 倒序输出
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;
}
这么水?。。。好吧,,谁叫我好呢。