This commit is contained in:
HuangHai
2025-08-30 18:35:01 +08:00
commit 1f397eca87
6258 changed files with 1487241 additions and 0 deletions

18
TangDou/XiTi/1073.cpp Normal file
View File

@@ -0,0 +1,18 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
float price[10] = {28.9, 32.7, 45.6, 78, 35, 86.2, 27.8, 43, 56, 65};
float total = 0;
for (int i = 0; i < 10; ++i) {
int a;
cin >> a;
total += price[i] * a;
}
//C语言写法
printf("%.1f\n", total);
//C++写法
cout << fixed << setprecision(1) << total << endl;
return 0;
}