c++ find area of the largest triangle that can be formed in a rectangle and round it off to the nearest integer
Answers
Answered by
0
"If the base of a triangle is same as one of the longer sides of a rectangle, then the vertex of the triangle should touch the opposite side of that rectangle, making it the biggest possible triangle inside that rectangle.
The area of a rectangle is length x breadth.
Area of a triangle is ½ x base x height.
The area of the biggest triangle that can fit inside it should be ½ x area of the rectangle;
since here, the base of the triangle is same as the length of the rectangle, while the height of the triangle is same as the breadth of the rectangle.
"
Similar questions