HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > CEN111 Homeworks 2013-2015 > problem:


14-Spr2-10. 50426 - Calculating Sales

CEN111 Homeworks 2013-2015

Start: Jan.10.2015 at 10:00:00 AM
Finish: Jan.10.2015 at 03:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (2)

Contest problems

• 14-Fall1-50. 50481 - Car Parking
• 14-Fall2-10. 50510 - What floor are ...
• 14-Fall2-20. 50504 - School contest
• 14-Fall2-30. 50523 - Total Tax to Pay
• 14-Fall2-40. 50514 - Bookkeeping
• 14-Fall2-50. 50534 - Top Trading C...
• 14-Fall2-60. 50487 - Radius of Inscr...
• 14-FallResit-20. 50407 - Missing Nu...
• 14-Spr2-10. 50426 - Calculating...
• 14-Spr2-20. 50425 - Calculating W...
• 14-Spr2-30. 50445 - Cryptography
• 14-Spr2-50. 50437 - Age Labeling
• 15-FallHW-2. 50821 - Derivative of ...
• 15-FallHW-3. 50822 - Linked List
• 15-FallHW-4. 50823 - Secret Number
• 15-FallHW-5. 50824 - Sum of Group...
• 15-FallHW-6. 50825 - Drawing Polygon

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Erisa Terolli.

Calculating Sales

An online retailer sells five different products whose retail prices are shown in the following table:

Product NumberRetail Price
12.89
24.50
39.98
44.49
56.87

Problem
Write a program that calculates and displays the total retail values of all products sold.

Input specification
You will be given lines of numbers containing two integers. First one represent the Product number and the second one the quantity sold. The end of input is marked with -1. Dont take into consideration products with negative quantity.

Output specification
Show the total retail values as a floating point number which have 2 digit precision after the floating point.

 Sample Input I   
1 1
2 1
3 1
4 1
5 1
-1
 Sample Output I   
28.73


Для отправки решений необходимо выполнить вход.

www.contester.ru