InchConvert


Submit solution

Points: 10
Time limit: 2.0s
Memory limit: 64M

Problem type
Allowed languages
Java 19, Java 8

題目說明

請寫一個程式,將英尺轉換為公尺。
一英尺=0.0254

如果可以形成三角形,令 s = (a + b + c)/2,
則該三角形的面積為\( \sqrt{s(s - a)(s - b)(s - c)} \) ,
求出該三角形的面積(四捨五入至小數點後第二位)。

輸入

由鍵盤輸入n (英尺)

輸出

將輸入轉換為公尺並輸出

sample input & output

輸入 輸出
DataSet1 1 1.0英尺=0.0254公尺
DataSet2 2 2.0英尺=0.0508公尺
DataSet3 3 3.0英尺=0.07619999999999999公尺

Comments

There are no comments at the moment.