Advertisement
stefanpu

Variations recursive

Feb 9th, 2013
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.23 KB | None | 0 0
  1. static void NestedLoops(int currentLoop)
  2. {
  3. if (currentLoop == numberOfLoops)
  4. {
  5. PrintLoops();
  6. return;
  7. }
  8. for (int counter=1; counter<=numberOfIterations; counter++)
  9. {
  10. loops[currentLoop] = counter;
  11. NestedLoops(currentLoop + 1);
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement