Q:

C# Program to Calculate Area of Circle

0

C# Program to Calculate Area of Circle

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

This program is compiled and tested on a Visual Studio 2012..

using System;

namespace TechStudyCSharp
{
    class Program
    {
        static void Main(string[] args)
        {
            double radius, area;                        
            Console.WriteLine("Enter Radius: ");
            radius = Convert.ToDouble( Console.ReadLine());
            area = Math.PI * radius * radius;
            Console.WriteLine("\nArea of circle: "+area);          
            Console.ReadKey();
        }
    }
}

Result:

Enter Radius: 

10

Area of circle: 314.159265358979

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C# Program to Calculate Area of Square... >>
<< C# Program to Print ASCII Value...