Before you write the code, you need to understand exactly what it needs to do. Start small. If n=1, what is it supposed to do? Print two #'s on a single line. What about n=2? I'll use a * for spaces for clarity, so it's supposed to print 2 lines,
*## on one line and `### on the next. Larger values for n produce similar changes. So what's the relationship between n, the number of lines, and the number of spaces and #s on a given line?
You're right about the for loops, but your code isn't structured right, or complete (assuming you didn't copy all of the curly braces.) You have 3 loops, each nested inside the one above. That will cause the # loop to execute n times for each line. The third loop should not be nested inside the second. Restructure them like so:
for( loop1 )
for( loop 2 )
// print spaces
// print hashes
Next, you are controlling the inner loops with n and only n. By doing that, every time they run, they will produce the same line. You need to control the inner loops based on which line is being printed, not the number of lines to print.
Finally, try walking through your code on paper and track what it will do, line by line. That will often help you understand the code and find errors.
That should guide you in the right direction. I could fix it for you, but that would rob you of all the fun of figuring it out!
If this answers your question, please accept the answer to close your question. Let's keep up on forum housekeeping. ;-)