提交时间:2019-12-07 11:53:59

运行 ID: 2728

#include<iostream> using namespace std; int main(){ double price[11]={0,28.9,32.7,45.6,78,35,86.2,27.8,43,56,65}; int a[11]={0}; double sum=0; for(int i=1;i<=10;i++){ cin>>a[i]; sum+=a[i]*price[i]; } printf("%.1lf",sum); return 0; }