Gfg Link:- Namespace in C++ | Set 1 (Introduction) - GeeksforGeeks Topic;- 1.Definition and Creation 2. Classes and Namespace 3. define methods also outside the namespace 4. Class can also be declared inside namespace and defined outside namespace
Area of Triangle with Three Sides (Heron’s Formula) The area of a triangle with 3 sides of different measures can be calculated using Heron’s formula . Heron’s formula includes two important steps. The first step is to find the semi perimeter of a triangle by adding all three sides of a triangle and dividing it by 2. The next step is to apply the semi-perimeter of triangle value in the main formula called “Heron’s Formula” to find the area of a triangle . where, s is semi-perimeter of the triangle = s = (a+b+c) / 2 //OR Area of a Triangle = A = ½ (b × h) square units Area of an Equilateral Triangle = A = (√3)/4 × side 2 Area of a Right Triangle = A = ½ × Base × Height (Perpendicular distance) The perimeter of a triangle is the distance covered around the triangle and is calculated by adding all three sides of a triangle. The perimeter of a triangle = P = (a + b + c) units where a, b and c are the sides of the triangle.
Comments
Post a Comment