ljx2004_cn @ 2023-11-19 19:01:17
#include<iostream>
using namespace std;
int main()
{
float a;
int b,c,d,e;
cin>>a;
b=a/100;
c=(a-b*100)/10;
d=(a-b*100-c*10)/1;
e=(a-b*100-c*10-d)*10;
a=e*1000+d*100+c*10+b;
a=a/1000;
cout<<a<<endl;
return 0;
}
by CSP_Sloser1130 @ 2023-11-19 19:12:42
其实你可以用字符串(string)的
by CSP_Sloser1130 @ 2023-11-19 19:13:24
主要是它也没说是几位小数啊