public class RecursiveNestedLoops
static int numberOfLoops;
static int numberOfIterations;
numberOfLoops = int.Parse(Console.ReadLine());
numberOfIterations = numberOfLoops;
loops = new int[numberOfLoops];
static void NestedLoops(int currentLoop)
if (currentLoop == numberOfLoops)
for (int counter=1; counter<=numberOfIterations; counter++)
loops[currentLoop] = counter;
NestedLoops(currentLoop + 1);
for (int i = 0; i < numberOfLoops; i++)
Console.Write("{0} ", loops[i]);