Find the side of the squares which are inclined diagonally and lined in a row | javascript program to find side of the squares inclined and touch each other externally at vertices and are lined in a row and distance between the centers of first and last squares is given ; Driver code
function radius ( n , d ) { document . write ( " " + ( d / ( ( n - 1 ) * Math . sqrt ( 2 ) ) ) . toFixed ( 5 ) ) ; } var d = 42 , n = 4 ; radius ( n , d ) ;