Connect with one of the following accounts


Please wait while we redirect...

Views: 161   

Following program shows you how to calculate circle area.
In this tutorial will get circle radius from user and calculate area and prints it using following formula
Area = PI X r X r

using System;

class MainClass {
  public static void Main (string[] args) {
    Console.WriteLine ("Please enter the radius of circle:");
    double circleRadius = Convert.ToDouble(Console.ReadLine());

    double areaOfCircle = Math.PI * (circleRadius * circleRadius);
    Console.WriteLine("Area of circle is: " + areaOfCircle);



Please enter the radius of circle:
Area of circle is: 113.097335529233

On By

Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News