Math.Sqrt : Math « System « C# / C Sharp by API






Math.Sqrt

  
  
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); 
  }     
}

   
    
  








Related examples in the same category

1.Math.Abs
2.Math.Cos()
3.Math.Min
4.Math.PI
5.Math.Round
6.Math.Sign
7.Math.Sin()
8.Math.Tan()