C# Program to Calculate the Area of a Circle

In this C# program, we will take input (radius) from the user and calculate the area of a circle. Formula to calculate area of circle is A= π*r*r.

C# Program to Calculate the Area of a Circle Code:

 private static void Main(string[] args)
        {
            Console.Write("Enter Radius: ");
            double rad = Convert.ToDouble(Console.ReadLine());
            double area = Math.PI * rad * rad;
            Console.WriteLine("Area of circle is: " + area);
            Console.ReadLine();
        }	

C# Program to Calculate the Area of a Circle Output:

C#-Program-to-Calculate-the-Area-of-a-Circle

 
We are nothing without our users ! You can help us offer even more high quality content. Please share our page !
Best quality Asp .Net Ajax Control Toolkit tutorials.

Give your valuable comments.

Name
Email
Comment
5 + 2 =
 
About Us | Terms of Use | Privacy Policy | Disclaimer | Contact Us Copyright © 2012-2022 CodingFusion
75 Important SQL Server queries you should know