Returns the variable Area as a double value. : double Calculation « Data Type « C# / CSharp Tutorial





using System;
class ReturnTest 
{
    static double CalculateArea(int r) 
    {
        double area = r * r * Math.PI;
        return area;
    }

    static void Main() 
    {
        int radius = 5;
        double result = CalculateArea(radius);
        Console.WriteLine("The area is {0:0.00}", result);

    }
}










2.27.double Calculation
2.27.1.Implement the Pythagorean Theorem
2.27.2.doubles and arithmetic operators
2.27.3.Compute the area of a circle with 'double'
2.27.4.Calculate the radius of a circle given its area using Math function
2.27.5.Use the while statement to implement Newton's method for finding the square root
2.27.6.Do calculation with double value
2.27.7.double base Fahrenheit and Celsius (Centigrade) Scales
2.27.8.Returns the variable Area as a double value.