- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Kotlin Program to Find the Area of a Circle

In this article, we will understand how find the area of a circle. Area of a circle is calculated by using the formula −

(pie*radius*radius)/7

Below is a demonstration of the same

Suppose our input is

Radius of the circle: 5

The desired output would be −

The Area of Circle is: 78.57142857142857

## Algorithm

**Step 1**− START**Step 2**− Declare two variables radius and myResult**Step 3**− Read the value of the radius from the user**Step 4**− Calculate the area of the circle by using the formula (22*radius*radius)/7 and store the result as area**Step 5**− Display the area value**Step 6**− STOP

## Example 1

In this example, we will find the area of a circle using the above given formulae. First. declare and set the radius

val radius = 5

Now, calculate the area of the circle and save the result in a new variable myResult

val myResult = (22 * (radius.toDouble().pow(2)))/7

Let us now see the example to get the area of a circle −

import java.util.* import kotlin.math.pow fun main() { val radius = 5 println("The radius of the circle is defined as $radius") val myResult = (22 * (radius.toDouble().pow(2)))/7 println("Area of circle is: $myResult") }

## Output

The radius of the circle is defined as 5 Area of circle is: 78.57142857142857

## Example 2

In this example, we will find the area of a circle −

import java.util.* import kotlin.math.pow fun main() { val radius = 5 println("The radius of the circle is defined as $radius") getArea(radius) } fun getArea(radius: Int) { val myResult = (22 * (radius.toDouble().pow(2)))/7 println("Area of circle is: $myResult") }

## Output

The radius of the circle is defined as 5 Area of circle is: 78.57142857142857

- Related Questions & Answers
- Java program to find the area of a circle
- Python Program to find the area of a circle
- C Program for Program to find the area of a circle?
- Find the Area of a Circle in Java Program
- Find the area of a circle in C programming.
- C program to find the area of circle and cylinder using structures.
- Program to calculate the area of an Circle inscribed in a Square
- Java program to find the circumference of a circle
- Java Program to Find the Perimeter of a Circle
- Area of decagon inscribed within the circle in C Program?
- C Program for area of decagon inscribed within the circle?
- Java program to find the area of a square
- Java program to find the area of a rectangle
- Java program to find the area of a triangle
- Java Program to Find the Area of a Trapezium
- Java Program to Find the Area of a Parallelogram