求助各位大佬!结果我下载查看了,数据是对的,不知道为什么WA
查看原帖
求助各位大佬!结果我下载查看了,数据是对的,不知道为什么WA
174743
SarielErica楼主2020/4/29 10:54
#include<iostream>
#include<math.h>
using namespace std;
int main(){
    float a;
    float b = 0; 
    cin>>a;
    for(int i=4; i>0; i--){
        float temp = pow(10,i-2);
        b += (a/temp)*pow(10,-i+1);
        a = a - (a/temp)*temp;
    }
    cout<<b;
    return 0;
}

感谢各位大佬帮助TAT

2020/4/29 10:54
加载中...