Run your program and check your output. Then you should see what is wrong:
- There are spaces between the stars on each line
- The number of stars is not correct
- There is only one line for multiple stars
Then think what you have to change to get the required output.
Because this is homework, you won't get it completely written for you here. Doing it yourself helps you to learn.
But I have some hints:
You are incrementing the loop variable
j
twice with each loop iteration. Don't do such if you have no specific reason.
You probably need three loops (the general count, the number of stars on a line, and the repeated lines).
I suggest to modify your code so that it prints the correct number of stars on a line. If that is done, enhance the code to implement the printing of repeated lines.