We are to find the hypotenuse of a triange with the two sides entered by the user.
Variables are defined in the first row. In the next lines, values are assigned to these variables.
In the last line we print the result of processing on the screen.
static void Main(string args)
double side1, side2, hypo;
Console.Write("Side 1 : ");
side1 = Convert.ToDouble(Console.ReadLine());
Console.Write("Side 2 : ");
side2 = Convert.ToDouble(Console.ReadLine());
hypo = Math.Sqrt(Math.Pow(side1, 2) + Math.Pow(side2, 2));
Console.WriteLine("Hypotenuse : "+hypo);
You can find more similar examples of programming for this programming language in the site.