Skip to content
本站總訪問量
本站訪客數 人次

TQC+ 程式語言Python 109 正五邊形面積計算

題目說明:請撰寫一程式,讓使用者輸入一個正數s,代表正五邊形之邊長,計算並輸出此正五邊形之面積(Area)。

提示1:建議使用import math模組的math.powmath.tan

提示2:正五邊形面積的公式:

Area=(5s2)÷(4tan(pi÷5))

提示3:輸出浮點數到小數點後第四位。

範例輸入

shell
5

範例輸出

shell
Area = 43.0119

Contributors

The avatar of contributor named as lucashsu95 lucashsu95

Changelog