Find the length of the median of a Triangle if length of sides are given | Function to return the length of the median using sides of triangle ; Driver Code ; Function call ; Print final answer with 2 digits after decimal
function median ( a , b , c ) { let n = ( Math . sqrt ( 2 * b * b + 2 * c * c - a * a ) / 2 ) ; return n ; } let a , b , c ; a = 4 ; b = 3 ; c = 5 ; let ans = median ( a , b , c ) ; document . write ( ans , 2 ) ;