You write it exactly the same as you would write it in any other verions of C++, by taking user input to determine the three sides of your triangle. In other words, input three real numbers. What you do with those three numbers is entirely up to you, but presumably you'd want to calculate the angles of a triangle given the length of its three sides. For that you would need to use the cosine rule which states that for any triangle with angles A, B and C whose opposing sides are a, b and c respectively, cos A = (b2 + c2 - a2)/2bc and cos B = (c2 + a2 - b2)/2ca. Knowing two angles, A and B, you can easily work out that angle C must be 180 - (A + B).
This triangle is called a scalene triangle.
An isosceles triangle has 2 equal sides whereas an equilateral triangle has 3 equal sides.
This would depend on what programming language you wanted to write it in. For example, in Pascal, the code might look like this: Program Isosceles; Var A, B, C : Real; Begin WriteLn('Input side A.'); ReadLn(A); WriteLn('Input side B.'); ReadLn(B); WriteLn('Input side C.'); ReadLn(C); If A = B Then Begin If B = C Then Begin WriteLn('This triangle is equilateral.'); End Else Begin WriteLn('This triangle is isosceles.'); And so on.
A triangle with two angles of the same degree and the this one at a different degree.
The perimeter of a triangle is the sum of its three sides.
Scalene Triangle- a triangle with no congruent sides Isosceles Triangle- a triangle with two congruent sides Equilateral Triangle- a triangle with three congruent sides
A triangle can have only three sides. No triangle can have 9 sides!
Scalene Triangle: a triangle with no two sides equalIsosceles Triangle: a triangle with two sides equalEquilateral Triangle: a triangle with all sides equalRight Triangle: A triangle with two 'legs' vertex creates a 90o angle.
A triangle with two congruent sides is an isosceles triangle, and a triangle with three congruent sides is an equilateral triangle.
They all have 3 sides but an equilateral triangle has 3 equal sides, an isosceles triangle has 2 equal sides and a scalene triangle has no equal sides.
A scalene triangle has no congruent sides. An equilateral has all equal sides, and an isosceles triangle has two of three sides equal.
A triangle has three sides.
A triangle with no equal sides is called a Scalene Triangle.
There is no such triangle. A triangle must have exactly 3 sides.
A triangle with no equal sides is a scalene triangle.
A triangle - any triangle - has 3 sides.
If all 3 sides are equal: Equilateral Triangle If 2 sides are equal: Isosceles Triangle If all 3 sides are unequal/different: Scalene Triangle