Calculate the Area of a Circle

Given an integer radius radius from 1 through 1000, compute the area of the circle using π = 3.14159. Round to two digits after the decimal point using…

Given an integer radius `radius` from 1 through 1000, compute the area of the circle using π = 3.14159. Round to two digits after the decimal point using round-half-up and return the result as decimal text with exactly two fractional digits.

- `radius` is an integer in the inclusive range 1 through 1000. - Use π = 3.14159. - Round half up to two digits after the decimal point. - Return a string with exactly two fractional digits.

Example 1: input radius = 2; output "12.57". The area is 3.14159 × 2 × 2 = 12.56636, which rounds half up to 12.57.

Example 2: input radius = 50; output "7853.98". The area is 7853.975, an exact halfway value that rounds up to 7853.98.

Example 3: input radius = 1000; output "3141590.00". The upper-bound radius produces 3141590 and keeps both fractional digits in the result.

Category: Math & Numbers. Topic: math. Difficulty: Easy. Patterns: math.