Skip to content

Latest commit

 

History

History

star-patterns

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Golang Programming Exercises - Star Patterns

To be written

  • Pattern 1 - Square

    *****
    *****
    *****
    *****
    *****
    
  • Pattern 2 - Hollow Square

    Enter number of rows: 5 
    *****
    *   *
    *   *
    *   *
    *****
    
  • Pattern 3 - Hollow square with diagonal

    Enter number of rows: 5 
    Enter number of columns: 10
    **********
    *        *
    *        *
    *        *
    **********
    
  • Pattern 4 - Rhombus

    Output
    Enter number of rows: 5 
    *****
    ** **
    * * *
    ** **
    *****
    
  • Pattern 5 - Mirrored Rohmbus

    Enter rows: 5
    *****
     *****
      *****
       *****
        *****
    
  • Pattern 6 - Hollow mirrored Rohmbus

    Enter the value of n: 5
    *****
     *   *
      *   *
       *   *
        *****
    
  • Pattern 7 - Right triangle

    Enter the value of n: 5
    *
    **
    ***
    ****
    *****
    
  • Pattern 8 - hollow right triangle

    Enter number of rows: 5
    *
    **
    * *
    *  *
    *****
    
  • Pattern 9 - mirrored right triangle

    Enter number of rows: 5
         *
        **
       ***
      ****
     *****
    
  • Pattern 10 - hollow mirrored right triangle

    Enter number of rows: 5
        *
       **
      * *
     *  *
    *****
    
  • Pattern 11 - reverse right triangle

    Enter number of rows: 5
    *****
    ****
    ***
    **
    *
    
  • Pattern 12 - hollow inverted right triangle

    Enter number of rows: 5
    *****
    *  *
    * *
    **
    *
    
  • Pattern 13 - reversed mirrored right triangle

    Enter number of rows: 5
    ****
     ***
      **
       *
    
  • Pattern 14 - hollow mirrored inverted right triangle

    Enter number of rows: 5
    *****
    *  *
    * *
    **
    *
    
  • Pattern 15 - print Equilateral triangle (Pyramid)

    Enter number of rows: 5
        *
       ***
      *****
     *******
    ********* 
    
  • Pattern 16 - hollow pyramid (Equilateral triangle)

    Enter number of rows: 5
        *
       * *
      *   *
     *     *
    *********
    
  • Pattern 17 - reverse Pyramid

    Enter number of rows: 5
    *********
     *******
      *****
       ***
        *
    
  • Pattern 18 - hollow inverted pyramid

    Enter number of rows: 5
    *********
     *     *
      *   *
       * *
        *
    
  • Pattern 19 - half diamond

    Enter number of columns: 5
    *
    **
    ***
    ****
    *****
    ****
    ***
    **
    * 
    
  • Pattern 20 - mirrored half diamond

    Enter number of columns : 5
        *
       **
      ***
     ****
    *****
     ****
      ***
       **
        *
    
  • Pattern 21 - print diamond

    Enter N: 5
        *
       ***
      *****
     *******
    *********
     *******
      *****
       ***
        *
    
  • Pattern 22 - hollow diamond

    Enter value of n : 5
    **********
    ****  ****
    ***    ***
    **      **
    *        *
    *        *
    **      **
    ***    ***
    ****  ****
    **********
    
  • Pattern 23 - right arrow

    Enter value of n : 5
    *****
     ****
        ***
         **
            *
         **
        ***
     ****
    *****
    
  • Pattern 24 - left arrow

    Enter value of n : 5
        *****
       ****
      ***
     **
    *
     **
      ***
       ****
        *****
    
  • Pattern 25 - Plus

    Enter N: 5
        +
        +
        +
        +
    +++++++++
        +
        +
        +
        +
    
  • Pattern 26 - X

    Enter N: 5
    *       *
     *     *
      *   *
       * *
        *
       * *
      *   *
     *     *
    *       *
    
  • Pattern 27 - 8

     ***
    *   *
    *   *
    *   *
     ***
    *   *
    *   *
    *   *
     ***
    
  • Pattern 28 - Heart

    Enter value of n: 10
      *****     *****
     *******   *******
    ********* *********
    *******************
     *****************
      ***************
       *************
        ***********
         *********
          *******
           *****
            ***
             *
    
  • Pattern 29 - Heart with name

    Enter your name: Codeforwin
    Enter value of n: 10
      *****     *****
     *******   *******
    ********* *********
    *****Codeforwin****
     *****************
      ***************
       *************
        ***********
         *********
          *******
           *****
            ***
             *