Average values
Problem
Averages between data can be calculated in a variety of ways. In mathematics, there are the following averages:
- arithmetic average of numbers
a
and b
: \(\dfrac{a+b}{2}\);
- geometric average of numbers
a
and b
: \( \sqrt{a\cdot b}\);
- harmonic average of numbers
a
and b
: \(\dfrac{2ab}{a+b}\);
- root average square numbers
a
and b
: \( \sqrt{\dfrac{a^2+b^2}{2}}\).
Input format
Given two real numbers
a
and
b
(1 <= a, b <= 1000).
Output format
Output four numbers, each on separate line – arithmetic average, geometric average, harmonic average and root average square.
Example
N |
Input |
Outpur |
1 |
12.5
36.2
|
24.35
21.27204738618265
18.58316221765914
27.08034342470568
|