# Area of a circle inscribed in a rectangle which is inscribed in a semicircle?

CServer Side ProgrammingProgramming

#### C in Depth: The Complete C Programming Guide for Beginners

45 Lectures 4.5 hours

#### Practical C++: Learn C++ Basics Step by Step

Most Popular

50 Lectures 4.5 hours

#### Master C and Embedded C Programming- Learn as you go

66 Lectures 5.5 hours

Let us consider one semicircle is given. Its radius is R. One rectangle of length l and breadth b is inscribed in that semi-circle. Now one circle with radius r is inscribed in the rectangle. We have to find the area of the inner circle. As we know biggest rectangle that can be inscribed within the semi-circle has length l and breadth b, then the equation of l and b will be like following −  Now, the biggest circle that can be inscribed within the rectangle has radius r is like below −  ## Example

#include <iostream>
#include <cmath>
using namespace std;
float innerCircleArea(float R){
return 3.1415 * pow(R / (2 * sqrt(2)), 2);
}
int main() {
float rad = 12.0f;
cout << "Area: " << innerCircleArea(rad);
}

## Output

Area: 56.547