Im looking to write a program that will read a number input from the user between 1 and 30. After I get the input I want to print that number of stars and lines in this pattern.

Lets say the user inputs the number 3: (pattern should look like this)
*** *** ***
*** ***
*** *** ***

There should be 3 lines since the number input was 3 and 3 stars in each group.

Im having trouble converting the number input, to the stars and lines.

Any help?