title: How to Display 4 Triangle Patterns Side by Side
body: <p>I'm having trouble getting 4 different triangle patterns to appear side by side. This is a console application program.</p>
  
  <p>This is exactly what I'm trying to achieve through the use of nested for loops: </p>
  
  <pre><code>*         ********************         *
  **        *********  *********        **
  ***       ********    ********       ***
  ****      *******      *******      ****
  *****     ******        ******     *****
  ******    *****          *****    ******
  *******   ****            ****   *******
  ********  ***              ***  ********
  ********* **                ** *********
  ***********                  ***********
  </code></pre>
  
  <p>I already have the individual patterns working already, but of course they appear one after the other.</p>
  
  <pre><code>using System;
  
  class Assignment5
  {
      static void Main()
      {
          for (int i = 1; i &lt;= 10; i++) // Outer loop for number of rows
          {
              for (int j = 1; j &lt;= i; j++) // Inner loop for number of stars
              {
                  Console.Write("*");
              }
              Console.WriteLine();
          } // End First Pattern
  
          for (int i = 10; i &gt;= 1; i--) // Outer loop for number of rows
          {
              for (int j = 1; j &lt;= i; j++) // Inner loop for number of stars
              {
                  Console.Write("*");
              }
              Console.WriteLine();
          } // End Second Pattern
  
          for (int i = 10; i &gt;= 1; i--) // Outer Loop for number of rows
          {
              for (int j = 1; j &lt;= 10 - i; j++)         //Inner loop for number of spaces
              {
                  Console.Write(" ");
              }
              for (int k = 1; k &lt;= i; k++)  //Secondary inner loop for number of stars
              {
                  Console.Write("*");
              }
              Console.WriteLine();
  
          } // End Third Pattern
  
          for (int i = 1; i &lt;= 10; i++)               //Outer Loop for number of rows
          {
              for (int j = 1; j &lt;= 10 - i; j++)         //Inner loop for number of spaces
              {
                  Console.Write(" ");
              }
              for (int k = 1; k &lt;= i; k++)  //Secondary inner loop for number of stars
              {
                  Console.Write("*");
              }
              Console.WriteLine();
          } // End Fourth Pattern
  
          Console.WriteLine("Press Enter for Part 2 of this Program");
          Console.ReadKey();
          Console.Clear();
  
      } // End main function
  
  
  } // End class Assignment5
  </code></pre>