C++计算书费_#include

#include <iostream>
#include <iomanip>
using namespace std;

int main() {
    double s = 0,arr[10] = {28.9,32.7,45.6,78,35,86.2,27.8,43,56,65};
	int n = 0;
	for (int i = 0;i < 10;i ++) {
		cin >> n;
		arr[i] *= n; 
	}
	for (int i = 0;i < 10;i ++) {
		s += arr[i];
	}
    cout << fixed << setprecision(1) << s << endl; 

    return 0;
}