By Amanda Beatriz Augusta da Silva, Instituto Federal do Sul de Minas Gerais Brazil
Mr. Moacir keeps a very important object for his family at home: a wooden chest from the 1950s. While cleaning his attic, he notices that the wood of the object is damaged and decides to restore it. It is known that solid wood is a costly material, so Moacir decides to restore only the damaged area.
The figure below corresponds to the side of your chest. The dark part of the figure corresponds to the damaged area that needs to be restored.
Understanding that ER is the radius of the semicircle, in which the center is E, your program must determine the value of the area that will be restored, given the values of X, Y and Z.
Note: Consider for this problem π = 3.
The input consists of three integer numbers N (1 ≤ N ≤ 1000), which indicate the values of X, Y and Z, respectively.
The output must contain the phrase “Nao eh retangulo!”, if the values read do not form a right triangle. If the values form a right triangle, the output should contain the word “AREA = ” followed by the total value corresponding to the dark area of the figure.
Input Samples | Output Samples |
13 5 12 |
AREA = 84 |
2 1 1 |
Nao eh retangulo! |