题目描述
输入一个不小于 100 且小于 1000,同时包括小数点后一位的一个浮点数,例如123.4,要求把这个数字翻转过来,变成4.321并输出。
输入格式
无
输出格式
无
输入输出样例
输入 #1 复制
123.4
输出 #1 复制
4.321
#include<iostream>
#include<string>
using namespace std;
int main(){
string str;
cin>>str;
for(int i=str.length()-1;i>=0;i--){
cout<<str[i];
}
return 0;
}