Keya_Adam @ 2024-10-28 19:54:00
#include <iostream>
#include <cmath>
using namespace std;
int main(){
float num;
float ans = 0;
int tmp;
int i = 0;
int gewei[3];
cin>>num;
int xiaoshu = (num - int(num))*10;
for(tmp = num; tmp>0 ;tmp = tmp/10){
gewei[i] = tmp%10;
i++;
}
for(int j=0;j<3;j++){
if(gewei[j]){
ans = ans + gewei[j]/pow(10,j+1);
}
else{
break;
}
}
ans += xiaoshu;
cout<<ans;
return 0;
}
by 0x3F @ 2024-10-28 20:00:16
@Keya_Adam 谁问你了