Computer Science, asked by shashankkataria8755, 10 months ago

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 aashu1342
0

Answer:

?????????????????????????????

Similar questions