
- C Programming Tutorial
- C - Home
- C - Overview
- C - Environment Setup
- C - Program Structure
- C - Basic Syntax
- C - Data Types
- C - Variables
- C - Constants
- C - Storage Classes
- C - Operators
- C - Decision Making
- C - Loops
- C - Functions
- C - Scope Rules
- C - Arrays
- C - Pointers
- C - Strings
- C - Structures
- C - Unions
- C - Bit Fields
- C - Typedef
- C - Input & Output
- C - File I/O
- C - Preprocessors
- C - Header Files
- C - Type Casting
- C - Error Handling
- C - Recursion
- C - Variable Arguments
- C - Memory Management
- C - Command Line Arguments
- C Programming useful Resources
- C - Questions & Answers
- C - Quick Guide
- C - Useful Resources
- C - Discussion
Area of a triangle inscribed in a rectangle which is inscribed in an ellipse In C Program?
Here we will see the area of a triangle which in inscribed in one rectangle and that circle is inscribed in an ellipse. The half of the major and minor axis are ‘a’ and ‘b’ respectively. Suppose the length of the rectangle is ‘l’ and breadth is ‘h’
We know that the area of the rectangle in an ellipse is −
The area of the triangle is −
Example
#include <iostream> #include <cmath> using namespace std; float area(float a, float b) { if (a < 0 || b < 0) //if the values are negative it is invalid return -1; float area = a*b; return area; } int main() { float a = 5, b= 2; cout << "Area is: " << area(a, b); }
Output
Area is: 10
- Related Articles
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse?
- Biggest Reuleaux Triangle inscribed within a square which is inscribed within an ellipse in C?
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle in C Program?
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle in C Program?
- Area of a circle inscribed in a rectangle which is inscribed in a semicircle in C?
- Area of a circle inscribed in a rectangle which is inscribed in a semicircle?
- Biggest Reuleaux Triangle inscribed within a square which is inscribed within an ellipse?
- Area of Largest rectangle that can be inscribed in an Ellipse?
- Area of a square inscribed in a circle which is inscribed in a hexagon in C Program?
- Area of largest triangle that can be inscribed within a rectangle in C Program?
- Area of circle which is inscribed in equilateral triangle in C Program?
- C Program for Area of a square inscribed in a circle which is inscribed in a hexagon?
- Area of circle which is inscribed in an equilateral triangle?
- Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle in C?
- Find the area of largest circle inscribed in ellipse in C++

Advertisements