Construct an array of first N natural numbers such that every adjacent pair is coprime | Function to construct an arrary with adjacent elements as co - prime numbers ; Iterate over the range [ 1 , N ] ; Print i ; Driver code
function ConstArrayAdjacentCoprime ( N ) { for ( let i = 1 ; i <= N ; i ++ ) { document . write ( i + " " ) ; } } let N = 6 ; ConstArrayAdjacentCoprime ( N ) ;