adding project for pythagore theorem
This commit is contained in:
@@ -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);
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user