Sine Rule with Derivation , Example and Implementation | Function to calculate remaining two sides ; Calculate angle B ; Convert angles to their respective radians for using trigonometric functions ; Sine rule ; Print the answer ; Input ; Function Call
function findSides ( A , C , c ) { let B = 180 - ( A + C ) ; A = A * ( 3.14159 / 180 ) ; C = C * ( 3.14159 / 180 ) ; B = B * ( 3.14159 / 180 ) ; let a = ( c / Math . sin ( C ) ) * Math . sin ( A ) ; let b = ( c / Math . sin ( C ) ) * Math . sin ( B ) ; document . write ( a . toPrecision ( 4 ) + " " ) ; document . write ( b . toPrecision ( 4 ) + " " ) ; } let A = 45.0 ; let C = 35.0 ; let c = 23 ; findSides ( A , C , c ) ;