Calculate the area of Circle.

 Calculate the area of Circle. 

CODE:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;


namespace area_of_circle

{

    class Program

    {

        static void Main(string[] args)

        {

            double radius = 2.0;

             double area= Math.PI * Math.Pow(radius,2 );

            Console.WriteLine($"The Area of Circle :{area}");

        }

    }

}

output:







Text Box


Comments

Post a Comment

Popular posts from this blog

Vertical and Reverse Paramid in c# using loop.

Calculator in c# using Static Methods

Calculator in c# using Method void method