1.0.2 • Published 5 months ago
adelist v1.0.2
Area of a Circle-calculator
This project calculates the area of a circle given its radius.
📌 Formula
The formula for the area of a circle is:
[ A = \pi r^2 ]
Where:
- ( A ) = Area of the circle
- ( r ) = Radius of the circle
- ( \pi ) (Pi) ≈ 3.14159
🚀 Usage
- Input: Provide the radius of the circle.
- Calculation: The program computes the area using the formula above.
- Output: The area is displayed as the result.
💻 Example
If the radius is 5:
[ A = \pi (5)^2 = 3.14159 \times 25 = 78.54 ]
Code Example (javascript)
const area = (rad) => {
return Math.PI * rad ** 2;
};
console.log(area(5)); // Output: 78.53981633974483