Given radius of the circle, we have to find the area of circle.
Example:
Input:
Radius: 3
Output:
Area of circle: 28.259999999999998
To find the area of the circle, we use the formula: π r2.
Here,
- π stands for PI which is a mathematical constant and it's value of 3.14, it defined as the ratio of a circle’s circumference to its diameter and it also has the various equivalent definitions.
- r is the radius of the circle.
Program to find area of circle in Kotlin
Output
need an explanation for this answer? contact us directly to get an explanation for this answer