# Biggest Reuleaux Triangle within A Square?

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

Here we will see the area of biggest Reuleaux triangle inscribed within a square. The side of the square is ‘a’. And the height of the Reuleaux triangle is h.

The height of the Reuleaux triangle is same as a. So a = h. So the area of Reuleaux triangle is −

## Example

#include <iostream>
#include <cmath>
using namespace std;
float areaReuleaux(float a) { //side of square is a
if (a < 0) //if a is negative it is invalid
return -1;
float area = ((3.1415 - sqrt(3)) * (a) * (a))/2;
return area;
}
int main() {
float side = 8;
cout << "Area of Reuleaux Triangle: " << areaReuleaux(side);
}

## Output

Area of Reuleaux Triangle: 45.1024
Updated on 01-Aug-2019 08:26:17