Under construction

Still being built. Things may change

Triangle Height

Time limit1sMemory limit1024 MB

Summary
Given several triangle areas and base lengths, the task prints each triangle's height to two decimal places using h = 2a / b.
Level

Easy1 of 10

Topics
Implementation, Math
Solved
No attempts yet

Problem

Your math teacher asked you to write a program that helps him generate homework solutions. The program must find the height of a triangle from its area and base length.

The formula is:

a=h⋅b2a = \frac{h \cdot b}{2}

Here aa is the area, bb is the base length, and hh is the height.

Input

The first line contains a single integer nn, the number of lines that follow. Each line contains the area and base length of a triangle, separated by a single space.

area base

Output

For each input, print the height of the triangle with 2 decimal places in the following format:

The height of the triangle is #.## units

Examples1

  1. Example 1

    Input
    4
    200.533 40.5
    10.6 1.11
    30 30
    3333 50.7
    
    Expected output
    The height of the triangle is 9.90 units
    The height of the triangle is 19.10 units
    The height of the triangle is 2.00 units
    The height of the triangle is 131.48 units