# 2.6. Studio: Area of a Circle¶

To get started, create a new console application in Visual Studio for the studio.

## 2.6.1. Calculate the Area of a Circle¶

Write a program that prompts the user for the radius of a circle. Calculate the area of the user’s circle and print the result.

Tip

Recall that the area of a circle is `A = pi * r * r` where `pi` is 3.14 and `r` is the radius.

Here’s an example of how your program should work:

```Enter a radius: 2.5
The area of a circle of radius 2.5 is: 19.625
```

1. What data type should the radius be?
2. What is the best way to get user input into a variable `radius` of that type?

Note

Use the `System.Math` class in C# to get the value of pi and square the radius. The documentation has guidance on how to use the `PI` field and the `Pow` method.

## 2.6.2. More Calculations¶

1. Using the same radius, calculate the circumference (`2*pi*r`) and diameter of the circle (`2*r`).
2. Output the results.

1. Think about how we could make this program more modular by breaking out some of the code into a separate class. For example, we could pull out the circle information into a `Circle` class and leave the user questions and console messages in `Program`. Take a look at for a refresher on using another class file.