Square and Circle Area


Submit solution

Points: 10 (partial)
Time limit: 1.0s
Memory limit: 64M

Authors:
Problem type
Allowed languages
Java 19, Java 8

題目說明

請撰寫一個程式,計算並輸出以下兩個面積,並在答案間加入 一個水平定位符號 (Tab) 來區隔。

  1. 一個邊長為 6 的正方形面積。
  2. 一個半徑為 5 的圓面積。

提示:
\[圓面積 = 半徑 × 半徑 × π\] (請使用 Math.PI 作為 π 的值)

範例

邊長為 1 半徑為 1

範例輸出

1   3.141592653589793

Comments

There are no comments at the moment.