# 一本通1104：计算书费(Yibentong 1104: calculating book fees)-其他

## 一本通1104：计算书费(Yibentong 1104: calculating book fees)

C++程序设计教程 78元/本

JAVA程序设计 65元/本

### 【输入样例】

``1 5 8 10 5 1 1 2 3 4``

### 【输出样例】

``2140.2代码如下：``
``````#include <stdio.h>
int main()
{
double price[15]={28.9,32.7,45.6,78,35,86.2,27.8,43,56,65};
int num[15];
double sum=0;
int i;

for(i=0;i<10;i++)
{
scanf("%d",&num[i]);
sum+=num[i]*price[i];
}
printf("%.1f\n",sum);
return 0;
}``````
————————

### [Title Description]

The following is a unit price table of books:

Introduction to calculation 28.9 yuan / book

Data structure and algorithm 32.7 yuan / book

Digital logic 45.6 yuan / book

C + + programming tutorial 78 yuan / book

Artificial intelligence 35 yuan / book

Computer architecture 86.2 yuan / book

Compilation principle 27.8 yuan / book

Operating system 43 yuan / book

Computer network 56 yuan / book

Java programming 65 yuan / book

Given the quantity of each book purchased, the total cost payable is calculated by programming.

### [input]

Enter a line containing 10 integers (greater than or equal to 0 and less than or equal to 100), which respectively represent the number of purchased introduction to computing, data structure and algorithm, digital logic, C + + programming tutorial, artificial intelligence, computer architecture, compilation principle, operating system, computer network and Java programming (in this unit). Every two integers are separated by a space.

### [output]

Output a line containing a floating-point number f, representing the total fee payable. Accurate to one decimal place.

### [input example]

``1 5 8 10 5 1 1 2 3 4``

### [output example]

``2140.2代码如下：``
``````#include <stdio.h>
int main()
{
double price[15]={28.9,32.7,45.6,78,35,86.2,27.8,43,56,65};
int num[15];
double sum=0;
int i;

for(i=0;i<10;i++)
{
scanf("%d",&num[i]);
sum+=num[i]*price[i];
}
printf("%.1f\n",sum);
return 0;
}``````