chenxi7 @ 2024-10-02 20:20:10
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
double sum = 0;
double a[10] = { 28.9,32.7,45.6,78,35,86.2,27.8,43,56,65 };
double b[10] = { 0 };
for (int i = 0; i < 10; i++)
{
cin >> b[i];
}
for (int i = 0; i < 10; i++)
{
sum += b[i] * a[i];
}
printf("%.1llf", sum);
return 0;
}
by Walrus @ 2024-10-02 20:23:47
@chenxi7 将 .1llf
改成 .1lf
,double
用的是 lf
by chenxi7 @ 2024-10-02 21:15:41
@Walrus 已AC,感谢