How to calculate circle area in C#

1 Answer

0 votes
using System;
					
public class Program
{
	public static void Main()
	{
		double radius = 5.6;
 
        double CircleArea;
 
        CircleArea = (Math.PI * radius * radius); 
 
        Console.WriteLine("The area of the circle is: " + CircleArea);
	}
}



/*
run:
    
The area of the circle is: 98.5203456165759
       
*/

 



answered Apr 21, 2017 by avibootz
edited Mar 30, 2021 by avibootz

Related questions

1 answer 145 views
145 views asked Aug 12, 2021 by avibootz
1 answer 212 views
1 answer 2,395 views
1 answer 107 views
1 answer 133 views
...