Write a program that reads several descriptions of rectangles and circles, and for each one prints its corresponding area.
Input begins with a number
,
followed by
descriptions. If of a rectangle, we have the word
“rectangle” followed by two strictly positive real numbers:
its length and its width. If of a circle, we have the word
“circle” followed by a strictly positive real number: its
radius.
For each description, print its area with 6 digits after the decimal point.
Author: Unknown
Translator: Salvador Roura
Generation: 2026-01-25T10:39:22.387Z
© Jutge.org, 2006–2026.
https://jutge.org