Implement the Pythagorean Theorem : double Calculation « Data Type « C# / CSharp Tutorial






using System;  

class MainClass {     
  public static void Main() {     
    double s1 = 3.0; 
    double s2 = 4.0; 
    double hypot; 
 
    hypot = Math.Sqrt(s1*s1 + s2*s2); 
  
    Console.WriteLine("Hypotenuse is " + hypot); 
  }     
}
Hypotenuse is 5








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.