
- 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 circle inscribed within rhombus in C Program?
Here we will see the area of circle which is inscribed in a rhombus. The diagonals of the rhombus are ‘a’ and ‘b’. The radius of the circle is h.
Two diagonals are creating four equal triangles. Each triangle is right-angled triangle, so their area is −
Each side of the rhombus is the hypotenuses −
So the area of the circle 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 = (3.1415 * (a*b * a*b))/(4 * (a*a + b*b)); return area; } int main() { float a = 8, b= 10; cout << "Area is: " << area(a, b); }
Output
Area is: 30.6488
- Related Articles
- Area of circle inscribed within rhombus?
- Area of decagon inscribed within the circle in C Program?
- C Program for area of decagon inscribed within the circle?
- Area of circle which is inscribed in equilateral triangle in C Program?
- Area of a square inscribed in a circle which is inscribed in a hexagon in C Program?
- C Program for Area of a square inscribed in a circle which is inscribed in a hexagon?
- Swift Program to Calculate Area of Circle Inscribed in Square
- Area of largest Circle inscribed in N-sided Regular polygon in C Program?
- Area of largest triangle that can be inscribed within a rectangle in C Program?
- 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 the biggest possible rhombus that can be inscribed in a rectangle in C Program?
- Biggest Reuleaux Triangle within a Square which is inscribed within a Circle in C?
- Find the area of largest circle inscribed in ellipse in C++
- Program to calculate the area of an Circle inscribed in a Square

Advertisements