大佬们,求助!!为什么是五wa
查看原帖
大佬们,求助!!为什么是五wa
1151431
pi0v0楼主2023/11/10 14:21
#include<cstdio>

using namespace std;

int main()
{
	int i,temp,res = 0;
	float a;
	scanf("%f", &a);
	a *= 10;
	temp = a;
	for (i = 0; i < 4; i++) {
		res += temp % 10;
		temp /= 10;
		res *= 10;
	}
	a = res;
	printf("%.1f", a/100 );

	return 0;
}
2023/11/10 14:21
加载中...