title: With how many loops can the following process be done in C++?
body: <p>I have to print out a triangle-star formed shape as such where the user specifies the intial number of asterisks--be it 10, 25, or 30.</p>
  
  <pre><code>***** (5) 
   ***  (3)
    *   (1)
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>********** (10)
   ********
    ******
     ****
      **
       *
  </code></pre>
  
  <p>I have written the code with three loops--two nested in one--using C++ Someone else claims that it can be done only using two loops but I can't seem to figure it out. In my head, its like asking to draw a triangle out of only 2 lines; it simply cannot work. I would appreciate it if someone could confirm if it can be done with only two loops and if so provide a hint or explanation.</p>