Generate a unique Array of length N with sum of all subarrays divisible by N | Function to print the required array ; Print the array ; Driver code
function makeArray ( n ) { for ( var i = 1 ; i <= n ; i ++ ) document . write ( i * n + " " ) ; } var N = 6 ; makeArray ( N ) ;