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
5
Answer:
(i) Should consist of standardized and acceptable symbols. (ii) The symbols should be correctly used according to flowcharts rules. (iii) Should have short, clear and readable statements written inside the symbols. (iv) It must have clear one starting point and one ending point.
Similar questions
English,
5 months ago
Social Sciences,
5 months ago
English,
10 months ago
English,
10 months ago
Environmental Sciences,
1 year ago
Math,
1 year ago