From a328578ad100e70b2087381d58b994ab45e876bb Mon Sep 17 00:00:00 2001 From: mrsh Date: Mon, 12 Jan 2026 00:23:32 +0100 Subject: [PATCH] adding project for pythagore theorem --- C# Full Course for free/7.hypotenuse_calculator.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/C# Full Course for free/7.hypotenuse_calculator.md b/C# Full Course for free/7.hypotenuse_calculator.md index d9bc727..1946da8 100644 --- a/C# Full Course for free/7.hypotenuse_calculator.md +++ b/C# Full Course for free/7.hypotenuse_calculator.md @@ -4,5 +4,17 @@ in this project we will cover how to implement the hypotenuse theorem $$ -a^2 + b^2 = c^2 +\sqrt{a^2 + b^2} = c $$ + +```C# +Console.Write("enter the length of A :"); +double a = Convert.ToDouble(Console.ReadLine()); + +Console.Write("enter the length of B :"); +double b = Convert.ToDouble(Console.ReadLine()); + +c = Math.Sqrt(Math.Pow(a,2) + Math.Pow(b,2)) + +Console.WriteLine("C is equal to : " + c); +```