Write a program to calculate the total cost from shopping for n commodities. The input consists of an integer n, followed by n pairs or doubles. In each pair, the first number is the quantity bought of the commodity, and the second the rate per unit for the commodity. The amount to be paid for each commodity is the product of the quantity and the rate; the program must print the total over all commodities. For example if the input is 3 2 30 3 10 5 60, the expected answer is 2*30 + 3*10 + 5*60 = 390
Answers
Answered by
0
Answer:
?????????????????????????????
Similar questions
English,
5 months ago
Chemistry,
5 months ago
Computer Science,
5 months ago
Social Sciences,
10 months ago
Math,
10 months ago
English,
1 year ago
Math,
1 year ago