Pythagorean theorem in c#

On remembering great Pythagoras, I have made a C# program that calculates Hypotenuse on basis of right angle triangle arms 

you can compile it on Online compilers for C#

i would recommend copying code from my GitHub Repo

using System;

namespace Pythagorean_theorem_Solver_In_C_sharp
    class Program
        static void Main(string[] args)
            //Pythagorean theorem in C# 
            Console.Title = "Pythagorean theorem By Apurva Singh";
            Console.WriteLine("This Project's Source Code Is Also Available On My Website");
            Console.WriteLine("Pythagorean theorem refers to Side A Squared + Side B Squared = Hypotenuse Squared ");
            Console.WriteLine("Note: Please Enter Single Units Only. Decimal Numbers and words Are Currently Isn't Allowed. Thanks ");
            Console.WriteLine("Please Enter Side A");
            string SideAasString = Console.ReadLine();
            int SideA = Int32.Parse(SideAasString);
            Console.WriteLine("Successfully Entered the value of Side A. You Have Entered " + SideA);
            Console.WriteLine("Please Enter Side B");
            string SideBasString = Console.ReadLine();
            int SideB = Int32.Parse(SideBasString);
            Console.WriteLine("Successfully Entered the value of Side B. You Have Entered " + SideB);
            int SideASQ = SideA * SideA;
            int SideBSQ = SideB * SideB;
            Console.WriteLine("Hypotenuse Is");
            int Final = SideASQ + SideBSQ;
            Console.WriteLine(" Units");
            Console.WriteLine("Thanks For Using");

Post a Comment