提交时间:2019-12-09 20:32:57
运行 ID: 3002
#include<iostream> using namespace std; int main(){ int num[11]={0}; double sum=0; double price[11]={0,28.9,32.7,45.6,78,35,86.2,27.8,43,56,65}; for(int i=1;i<=10;i++){ cin>>num[i]; sum+=num[i]*price[i]; } printf("%.1lf",sum); return 0; }