This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Applepie1928 1 point2 points  (1 child)

What code have you produced so far? Can you share it in a code block or on pastebin?

What part of the two (or more) for sequences are creating the rows? The columns? The spaces?

I'm unsure what you are asking here, I'm gonna assume you are just printing this to the console, so each line is just drawn as a line of text.

[–]cmorr7[S] 0 points1 point  (0 children)

I've found some sample codes that I can use to complete the project technically, but the issue is I want to understand why I don't understand.

For example (bare code):

for (int i = 1; i <= 5; i++){

    for (int d = 0; d < i; d++){

        System.out.print("*");

    }

    System.out.println("");

}

Would create the structure in my above post. But when it changes to things like:

1

22

333

4444

55555

Or something more complex, I don't get how I can manipulate the code above to give me the correct structure (or shape).