The way to approach this problem is to do one part at a time. You've already done two - getting the user input and printing out the correct number of lines. Now, break the rest of the problem down into smaller parts. In this case, there are really only two left. One part is to print the correct number of #s on each line. The other is to print the correct number of spaces on each line.
The easiest approach is to figure out how to print the correct number of #s on each line first. Work on that and get it right. Don't worry about the spaces yet. Just get the right number of #s to print on each line. Once that's right, then move on to the last part.
When you have the #s right, figure out how to print the correct number of spaces on each line. Since counting blank spaces isn't easy, print something else first, like @ signs, so that you can count them. Once you are printing the right number of them, just go back and change the @ back to a space in your code.
Another tip: If you are having trouble grasping the big picture, try figuring out how many #'s to print out for one line, then for two, then 3, and so on until you see the pattern. Same for spaces.
The problem looks complicated when you try to do everything at once, but when you break it down into small parts, it gets much easier.
If this answers your question, please click the check mark to accept this and remove the question from the unanswered pool. Let's keep up on forum maintenance. ;-)