eolymp
bolt
Try our new interface for solving problems
Problems

Use sub-program

Use sub-program

Calculate the sum and product N pairs which set material numbers, having taken advantage of subroutine \textit{\textbf{SumDob}} for calculation of the sum and product of two material numbers. \InputFile In the first line set the natural number \textbf{N} - quantity of pairs numbers. In the subsequent \textbf{N} lines through a blank it set on \textbf{2} material numbers. All input on the module does not exceed \textbf{100}. \OutputFile In \textbf{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 \textbf{4 }signs after a decimal point.
Time limit 0.5 seconds
Memory limit 64 MiB
Input example #1
2
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