- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

Suppose one rectangle is given. We know the length L and breadth B of it. We have to find the area of largest triangle that can be inscribed within that rectangle −

The largest triangle will always be the half of the rectangle. So it will be

#include <iostream> #include <cmath> using namespace std; float area(float l, float b) { if (l < 0 || b < 0 ) //if the valuse are negative it is invalid return -1; float area = (l*b)/2; return area; } int main() { float a = 10, b = 8; cout << "Area : " << area(a, b); }

Area : 40

- Related Questions & Answers
- Area of the largest triangle that can be inscribed within a rectangle?
- Area of Largest rectangle that can be inscribed in an Ellipse?
- Area of the biggest possible rhombus that can be inscribed in a rectangle in C Program?
- Biggest Square that can be inscribed within an Equilateral triangle?
- Biggest Square that can be inscribed within an Equilateral triangle in C?
- Area of the biggest possible rhombus that can be inscribed in a rectangle in C?
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse In C Program?
- Area of the Largest Triangle inscribed in a Hexagon in C++
- Area of the Largest square that can be inscribed in an ellipse in C++
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse?
- C++ program to find the Area of the Largest Triangle inscribed in a Hexagon?
- Area of circle inscribed within rhombus in C Program?
- Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle in C?
- Area of decagon inscribed within the circle in C Program?
- Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle?

Advertisements