Area of the circle that has a square and a circle inscribed in it | C ++ implementation of the approach ; Function to return the required area ; Calculate the area ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; float getArea ( int a ) { float area = ( M_PI * a * a ) / 4.0 ; return area ; } int main ( ) { int a = 3 ; cout << getArea ( a ) ; return 0 ; }