Length of a Diagonal of a Parallelogram using the length of Sides and the other Diagonal | Function to calculate the length of the diagonal of a parallelogram using two sides and other diagonal ; Driver Code ; Function Call ; Print the final answer
function Length_Diagonal ( a , b , d ) { let diagonal = Math . sqrt ( 2 * ( ( a * a ) + ( b * b ) ) - ( d * d ) ) ; return diagonal ; } let A = 10 ; let B = 30 ; let D = 20 ; let ans = Length_Diagonal ( A , B , D ) ; document . write ( ans . toFixed ( 1 ) ) ;