Question #249285

Write a program to calculate the area of a circle and display the reuslt. Use the formula: a=πr^2 where Pi is approximately equal to 3.1416

Expert's answer

```
using System;
namespace App
{
class Program
{
static void Main(string[] args)
{
const double PI = 3.1416;
Console.Write("Enter a radius of a circle: ");
double r = Convert.ToDouble(Console.ReadLine());
double area = PI * r * r;
Console.WriteLine("The area of a circle = {0}", area);
Console.ReadLine();
}
}
}
```

Learn more about our help with Assignments: C#

## Comments

## Leave a comment