Lindsey,
To find a
pattern, it's often easier if you start with a few concrete examples first. Then you examine these examples and look for both similarities and differences. Then you try to generalize these similarities and differences in such a way that any other example will fit into that generalization. That's how you find a pattern. The basic rule of patterns is that you need at least three concrete examples.
So, going through your figure, take a few lines (maybe the first 3 or 4 lines) and try to answer these questions:
1. How many spaces do you have to print before printing the first number?
2. How many numbers do you have to print? (count)
3. What number do you start with? (lower bound)
4. What number do you end with? (upper bound)
I'll answer these for the first three lines:
Line 1:
1. Print 7 spaces, then the number 1
2. 1 number printed
3. start with 1
4. end with 1
Line 2:
1. Print 6 spaces, then the number 1
2. 3 numbers printed
3. start with 1
4. end with 2
5. go back down to 1
Line 3:
1. Print 5 spaces, then the number 1
2. 5 numbers printed
3. start with 1
4. end with 3
5. go back down to 1
Continue this exercise until you see the pattern emerging. You'll soon realize that each set of questions/answers represents one iteration of an outer loop.
You should also be able to find where one or more inner loops will be represented. Look for relationships between successive lines and repetitive things. If something is consistently increasing, how much did it increase by from the previous line? If it's consistently decreasing, how much did it decrease by? This will give you an idea of what the increment size will be for your loop variables.
This is really just an exercise in algorithm development. An algorithm is a logical and systematic way of solving a problem and your task is to figure out what that is.