Sum of lengths of all 12 edges of any rectangular parallelepiped | Java 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
import java . io . * ; class GFG { static double findEdges ( double s1 , double s2 , double s3 ) { double a = Math . sqrt ( s1 * s2 / s3 ) ; double b = Math . sqrt ( s3 * s1 / s2 ) ; double c = Math . sqrt ( s3 * s2 / s1 ) ; double sum = a + b + c ; return 4 * sum ; } public static void main ( String [ ] args ) { double s1 , s2 , s3 ; s1 = 65 ; s2 = 156 ; s3 = 60 ; System . out . print ( findEdges ( s1 , s2 , s3 ) ) ; } }