HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


50426 - Calculating Sales

Guest
• Review clarifications (2)

Section problems

• 50879 - Passed or Failed
• 50428 - Three Times
• 50387 - Passengers in the Train
• 50391 - Cinema Tickets
• 50402 - Hello World!
• 50489 - Football Championship
• 51004 - Word Search Game
• 50430 - ATM
• 50426 - Calculating Sales
• 50425 - Calculating Weekly Pay
• 50438 - Pattern with stars
• 50820 - Post Office
• 50810 - Print Office
• 50952 - Derby Tirana
• 50443 - Dajte Express
• 50819 - Linked Numbers
• 50519 - Image Filtering

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