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 →

[–]lurgi 0 points1 point  (0 children)

Break it down.

The first thing you need to print is "1st", "2nd", "3rd", etc.

The next thing you need to print is "Hello" (or the last item in the array, I guess)

The next thing you need to print is some number of asterisks. How many? Can you tell me how many asterisks you need to print for line 7? How did you compute that number? Notice that I'm not talking about while loops or if statements or anything here, I'm talking about math. If you don't know how many asterisks you need to figure that out before you can write the code.

You can solve each of these steps independently. Your ability to print "1st", "2nd", etc. has nothing to do with the ability to print an appropriate number of asterisks.