adding project for pythagore theorem

This commit is contained in:
2026-01-12 00:23:32 +01:00
parent 15462198d5
commit a328578ad1

View File

@@ -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);
```