Sum of lengths of all 12 edges of any rectangular parallelepiped | C ++ program to illustrate the above problem ; function to find the sum of all the edges of parallelepiped ; to calculate the length of one edge ; sum of all the edges of one side ; net sum will be equal to the summation of edges of all the sides ; Driver code ; initialize the area of three faces which has a common vertex
#include <bits/stdc++.h> NEW_LINE using namespace std ; double findEdges ( double s1 , double s2 , double s3 ) { double a = sqrt ( s1 * s2 / s3 ) ; double b = sqrt ( s3 * s1 / s2 ) ; double c = sqrt ( s3 * s2 / s1 ) ; double sum = a + b + c ; return 4 * sum ; } int main ( ) { double s1 , s2 , s3 ; s1 = 65 , s2 = 156 , s3 = 60 ; cout << findEdges ( s1 , s2 , s3 ) ; return 0 ; }