使用long double
#include <iostream>
#include <cstdio>
using namespace std;
long double ans=0.0, xx;
int main(){
while(scanf("%Lf", &xx)!=EOF)
ans = ans + xx * 1000000;
printf("%.5Lf", ans/1000000);
return 0;
}
标签:turn scan iostream log ace names namespace ios pos
使用long double
#include <iostream>
#include <cstdio>
using namespace std;
long double ans=0.0, xx;
int main(){
while(scanf("%Lf", &xx)!=EOF)
ans = ans + xx * 1000000;
printf("%.5Lf", ans/1000000);
return 0;
}
标签:turn scan iostream log ace names namespace ios pos
原文地址:https://www.cnblogs.com/poorpool/p/8168704.html