提交时间:2019-12-07 14:33:48
运行 ID: 2839
#include <iostream> #include <iomanip> using namespace std; int main() { float a[10]={28.9,32.7,45.6,78,35,86.2,27.8,43,56,65},x=0; int i,num; for (i=0;i<10;i++){ cin >> num; x += num*a[i]; } cout << fixed << setprecision(1) << x; return 0; }