title: Dynamic Nested Loops (C++)
body: <p>Hello I am looking for a way to write this C++ Code in a general way, so that if a want 20 columns I will not have to write 20 for loops:</p>
  
  <pre><code>for(int i=1; i&lt;6; i++) {
      for(int j=i; j&lt;6; j++) {
          for(int k=j; k&lt;6; k++) {
              for(int m=k; m&lt;6; m++) {
                  std::cout &lt;&lt; i &lt;&lt; j &lt;&lt; k &lt;&lt; m &lt;&lt; std::endl;
              }
          }
      }
  }
  </code></pre>
  
  <p>It is important that my numbers follow a >= Order. 
  I am very grateful for any help.</p>