title: How to obtain sequency specific in C++
body: <p>How to obtain the sequency specific in C++?</p>
  
  <p>I need sequency: 1,2,2,2,3,4,4,4,5,6,6,6,7,8,8,8</p>
  
  <p>and 1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8</p>
  
  <p>and 1,1,0,0,1,1,0,0,1,1,0,0</p>
  
  <p>using counter 1,2,3,4,5,6,7,...</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  int main()
  {
      int n, i, seq;
      cin &gt;&gt; n;
      for (i = 0; i &lt; n; i++)
      {
          ........
      }
      cout &lt;&lt; seq &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>I need Result:</p>
  
  <p>1,2,2,2,3,4,4,4,5,6,6,6,7,8,8,8</p>
  
  <p>and</p>
  
  <p>1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8</p>
  
  <p>and</p>
  
  <p>1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0</p>