Skip to content

Instantly share code, notes, and snippets.

@RMcGee
Created September 12, 2013 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RMcGee/6544244 to your computer and use it in GitHub Desktop.
Save RMcGee/6544244 to your computer and use it in GitHub Desktop.
double aSide, bSide, cSide;
Console.WriteLine("Enter the value of side A");
aSide = double.Parse(Console.ReadLine());
Console.WriteLine("Enter the value of side B");
bSide = double.Parse(Console.ReadLine());
cSide = Math.Sqrt((aSide * aSide) + (bSide * bSide));
Console.WriteLine("the length of the hypotenuse will be {0:0.00}", cSide);
Console.ReadLine();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment