Generate a unique Array of length N with sum of all subarrays divisible by N | C # program for the above approach ; Function to print the required array ; Print the array ; Driver code
using System ; class GFG { static void makeArray ( int [ ] a , int n ) { for ( int i = 1 ; i <= n ; i ++ ) Console . Write ( i * n + " ▁ " ) ; } public static void Main ( ) { int N = 6 ; int [ ] arr = new int [ N ] ; makeArray ( arr , N ) ; } }