We are providing online training of realtime Live project on Asp.Net MVC with Angular and Web API. For more information click here. If you have any query then drop the messase in CONTACT FORM

Wednesday, November 29, 2017

Find a Number using Pythagoras Theorem in c#

  class Program
    {
        static void Main(string[] args)
        {
            double num1, num2, result;

            Console.WriteLine("Enter the First Value ");
            num1 = double.Parse(Console.ReadLine());

            Console.WriteLine("Enter the Second Value ");
            num2 = double.Parse(Console.ReadLine());

            result = Math.Sqrt(num1 * num1 + num2 * num2);
            Console.WriteLine("The Other Number is : {0}", result);
            Console.ReadLine();
        }
    }

Output:

No comments: