title: How can I program something that asks two integers from the user and displays it in the following sequence in C++?
body: <p>I'm a kind of beginner in C++ and need little help here.
  How can I create a C++ program which takes two integers from the user and It displays the sequence in this format using Nested Loops: </p>
  
  <p>Enter the starting integer: 11</p>
  
  <p>Enter the ending integer: 18</p>
  
  <p>(11,11)(11,12)(11,13)(11,14)(11,15)(11,16)(11,17)(11,18)</p>
  
  <p>(12,12)(12,13)(12,14)(12,15)(12,16)(12,17)</p>
  
  <p>(13,13)(13,14)(13,15)(13,16)</p>
  
  <p>(14,14)(14,15)</p>
  
  <p>or</p>
  
  <p>Enter the starting integer: 1</p>
  
  <p>Enter the ending integer: 5</p>
  
  <p>(1,1)(1,2)(1,3)(1,4)(1,5)</p>
  
  <p>(2,2)(2,3)(2,4)</p>
  
  <p>(3,3)</p>
  
  <p>I wrote the code something like this before:</p>
  
  <pre><code>int startingval;
      cout &lt;&lt; "Enter starting integer: ";
      cin &gt;&gt; startingval;
  
      int endingval;
      cout &lt;&lt; "Enter Ending integer: ";
      cin &gt;&gt; endingval;
  
      int looptime;
      looptime = endingval;
  
      endingval = startingval;
  
  
  
      for (int i = 0; i &lt; startingval; i++)
      {
  
              cout &lt;&lt; "(" &lt;&lt; startingval &lt;&lt; ", " &lt;&lt; endingval &lt;&lt; ")";
              endingval++;
  
              if (endingval == looptime + 1)
              {
                  i = startingval;
         }
  
      }
  
  
  
  
      return 0;
  </code></pre>
  
  <p>But, This is not what I need. Please Help me :) </p>