favorite We need a little bit of your help to keep things running, click on this banner to learn more

Use sub-program

Use sub-program

Calculate the sum and product N pairs which set material numbers, having taken advantage of subroutine SumDob for calculation of the sum and product of two material numbers.


In the first line set the natural number N - quantity of pairs numbers. In the subsequent N lines through a blank it set on 2 material numbers. All input on the module does not exceed 100.


In N lines deduce through a blank on two numbers: at first the sum, and then product of the next pair numbers. Result deduces with accuracy 4 signs after a decimal point.

Time limit 0.5 seconds
Memory limit 64 MiB
Input example #1
6 7.5
2.1 2.0
Output example #1
13.5000 45.0000
4.1000 4.2000

Example description: Permission is granted to use 2 sub-program to find the sum and product respectively each separately.

Source SFE-2010 Variant 13