Compute the area of a circle with 'double' : double Calculation « Data Type « C# / CSharp Tutorial






using System;  
   
class Circle {   
  public static void Main() {   
    double radius; 
    double area; 
 
    radius = 10.0; 
    area = radius * radius * 3.1416; 
 
    Console.WriteLine("Area is " + area); 
  }   
}
Area is 314.16








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.