-
-
Describe
-
Below is a price list for a book:
Introduction to calculation 28.9 yuan/book
Data structure and algorithm 32.7 yuan/This
Digital logic 45.6 yuan/This
C + + Programming tutorial 78 yuan/Book
Ai 35 Yuan/This
Computer architecture 86.2 Yuan/This
Compilation principle 27.8 Yuan/this
Operating system 43 Yuan/This
Computer network 56 Yuan/This
Java programming 65 Yuan/This
Given the quantity purchased for each type of book, the total cost to be calculated is programmed.
-
-
Input
-
-
Enter a row, containing 10 integers (greater than or equal to 0, less than or equal to 100), respectively, the purchase of "Introduction to Computing", "Data structure and algorithm", "Digital Logic", "C + + Programming Tutorial", "Artificial Intelligence", "Computer Architecture", "Compiling principle", "Operating system", " Computer network, the number of Java programming (in this unit). Each of the two integers is separated by a single space.
-
-
Output
-
The
-
output line contains a floating-point number F, which represents the total cost to be met. Accurate to one digit after the decimal point.
-
-
Sample input
-
-
1 5 8 10 5 1 1 2 3 4
-
-
Sample output
-
2140.2
1#include <stdio.h>2 intMain ()3 {4 inta[ One]={0};5 floatC=0;6 for(intI=1; i<=Ten; i++)7scanf"%d",&a[i]);8C=28.9*a[1]+32.7*a[2]+45.6*a[3]+ +*a[4]+ **a[5]+86.2*a[6]+27.8*a[7]+ +*a[8]+ About*a[9]+ $*a[Ten];9printf"%.1f\n", c);Ten return 0; One}
1-6-03: Calculate the book fee