Construct an array of first N natural numbers such that every adjacent pair is coprime | C # program to implement the above approach ; Function to construct an arrary with adjacent elements as co - prime numbers ; Iterate over the range [ 1 , N ] ; Print i ; Driver Code
using System ; class GFG { static void ConstArrayAdjacentCoprime ( int N ) { for ( int i = 1 ; i <= N ; i ++ ) { Console . Write ( i + " ▁ " ) ; } } public static void Main ( ) { int N = 6 ; ConstArrayAdjacentCoprime ( N ) ; } }