title: How to do pattern program in Ruby?
body: <p>I am using Ruby 1.9.3. I have done pattern program like follow: </p>
  
  <pre><code>n = 1
  while n &lt;= 5
    n.downto 1 do |i|
      print "* "
    end
    puts
    n += 1
  end
  </code></pre>
  
  <p>Output of above program is like follow: </p>
  
  <pre><code>*
  * *
  * * * 
  * * * *
  * * * * *
  </code></pre>
  
  <p>Now I am trying to do pattern program like follow: </p>
  
  <pre><code>        *
        * *
      * * *
    * * * *
  * * * * *    
  </code></pre>
  
  <p>I am not getting idea how can I do it?</p>
  
  <p>Could anyone help me on this?</p>
  
  <p>Thank you.</p>