Lab 4: Pattern Maker

For this lab we will be designing a pattern maker. The pattern maker takes an odd number as user input and draws the required pattern as per the level of the designer.

The pattern maker given to you prints out a line.

Sample Output:

***

Change the program to take user Input for an odd number for the pattern maker.

Comment each level and proceed to next level as you do your lab.

Level 1: Square (1 Point)

The pattern maker takes an odd integer as an input and outputs a square pattern.

Use the odd integer to determine the side of a square.

For example:

Welcome to Pattern maker.

Please an odd Integer for the Pattern Maker: 5

*****

*****

*****

*****

*****

Level 2: Triangle (1 Point)

The pattern maker takes an odd integer as an input and outputs a Triangle pattern.

Use the odd integer to determine the max length of the triangle.

For example:

Welcome to Pattern maker.

Please an odd Integer for the Pattern Maker: 5

*

***

*****

***

*

Level 3: Diamond (Extra Credit, 1 Point)

The pattern maker takes an odd integer as an input and outputs a diamond pattern.

Use the odd integer to determine the length of the diamond.

For example:

Welcome to Pattern maker.

Please an odd Integer for the Pattern Maker: 5

    *

   ***

  *****

   ***

    *