Computing areas

Write a program that reads several descriptions of rectangles and
circles, and for each one prints its corresponding area.

Input

Input begins with a number n, followed by n 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.

Output

For each description, print its area with 6 digits after the decimal
point.

Problem information

Author: Unknown
Translator: Salvador Roura

Generation: 2026-01-25T10:39:22.387Z

© Jutge.org, 2006–2026.
https://jutge.org
