Tuesday, December 13, 2011

Pythagorean theorem to find the length of the hypotenuse given the lengths of the two opposing sides using C-sharp


// Pythagorean theorem to find the length of the hypotenuse given the lengths of the two opposing sides.
using System;
class Hypo
{
    static void Main()
    {
        double x, y, z;

        x = 3;
        y = 4;

        z = Math.Sqrt((x * x) + (y * y));
        Console.WriteLine("The Hypotenuse is " +z);
    }
}

No comments:

Google : The top most search engine

Google : MAGIC BOX

nRelate - Posts and Homepage

LinkWithin

Related Posts Plugin for WordPress, Blogger...

Which is the toughest subject ?