P5705求助!
查看原帖
P5705求助!
754040
yeqiwei楼主2022/8/21 11:59
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
    float a;
    int h,t,o,f;
    cin>>a;
    h=floor(a/100);
    t=floor(fmod(a,100)/10);
    o=floor(fmod(a,10));
    f=(a-100*h-10*t-o)*10;
    cout<<f<<"."<<o<<t<<h;
    return 0;
}
2022/8/21 11:59
加载中...