Area of a Circle
Easy
basics
math
Description
Calculate the area of a circle given its radius (`r`). Use $\pi \approx 3.14159$. Round the result to two decimal places.
Examples
Example:
Input: r = 4.0
Output: 50.27
Explanation: Area = 3.14159 * 4.0^2 = 50.26544. Rounded to two decimal places is 50.27.
Constraints
- r is a positive float.
- Use $\pi = 3.14159$.
- Result must be a float rounded to 2 decimal places.
Loading...
Test Case 1
Input: 4
Output: 50.27
Test Case 2
Input: 1
Output: 3.14
Test Case 3
Input: 10
Output: 314.16
