static private double missingl(double a, double c)
static private double pyth(double a, double b)
return Math.Sqrt(a2 + b2);
public static void Main()
while(choice != "n" && choice != "N")
Console.WriteLine("Enter 'ML' if you would like to find a missing leg or 'HYP' to find a hypatanus leg. Type in all CAPS");
string input = Console.ReadLine();
Console.WriteLine("Please enter your first value");
double input1 = double.Parse(Console.ReadLine());
Console.WriteLine("Please enter your second value");
double input2 = double.Parse(Console.ReadLine());
double output = pyth(input1, input2);
Console.WriteLine("The hypotenus of a tringle with legs " + input1 + " and " + input2 + " is " + output + ".");
Console.WriteLine("Would you like to restart? y/n");
choice = Console.ReadLine();
Console.WriteLine("Please enter the hypatanus");
double input1 = double.Parse(Console.ReadLine());
Console.WriteLine("Please enter the leg");
double input2 = double.Parse(Console.ReadLine());
double output = missingl(input1, input2);
Console.WriteLine("The missing leg of a tringle a hypotenus of " + input1 + " and leg of " + input2 + " is "+ output +".");
Console.WriteLine("Would you like to restart? y/n");
choice = Console.ReadLine();