How to Compute area of a circle in C# ?

Below is a sample sourcecode that demonstrates the computation of the area of a circle in c#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            double radiusofcircle;
            double areaOfCircle;
            double pi = 3.1416;
            radiusofcircle = 25;
            areaOfCircle = radiusofcircle * radiusofcircle * pi;
            Console.WriteLine("Area is " + areaOfCircle);
            Console.Read();
        }
    }
}
%d bloggers like this: