Find N values of X1 , X2 , ... Xn such that X1 < X2 < ... < XN and sin ( X1 ) < sin ( X2 ) < ... < sin ( XN ) | Function to print all such Xi s . t . all Xi and sin ( Xi ) are strictly increasing ; Till N becomes zero ; Find the value of sin ( ) using inbuilt function ; Increment by 710 ; Driver Code ; Function Call
function printSinX ( N ) { let Xi = 0 ; let num = 1 ; while ( N -- > 0 ) { document . write ( " " + num + " " + Xi ) ; document . write ( " " + num + " " ) ; document . write ( Math . sin ( Xi ) . toFixed ( 6 ) ) ; document . write ( " " ) ; num += 1 ; Xi += 710 ; } } let N = 5 ; printSinX ( N ) ;