题目
答案代码
#include<iostream>
using namespace std;
int main()
{
double num;
cin >> num;
num *= 10;
int a = (int)num;
double result = 0;
while (a != 0)
{
result *= 10;
result += a % 10;
a /= 10;
}
result *= 0.001;
cout << result << endl;
return 0;
}