Area of circle inscribed within rhombus | C ++ Program to find the area of the circle which can be inscribed within the rhombus ; Function to find the area of the inscribed circle ; the diagonals cannot be negative ; area of the circle ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; float circlearea ( float a , float b ) { if ( a < 0 b < 0 ) return -1 ; float A = ( 3.14 * pow ( a , 2 ) * pow ( b , 2 ) ) / ( 4 * ( pow ( a , 2 ) + pow ( b , 2 ) ) ) ; return A ; } int main ( ) { float a = 8 , b = 10 ; cout << circlearea ( a , b ) << endl ; return 0 ; }