Implement the Pythagorean Theorem
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);
}
}
Output Hypotenuse is 5
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
-
|