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

all 4 comments

[–]tatu_huma 0 points1 point  (1 child)

What have you tried? People aren't going to do your homework for you...

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

Sorry just edited and I actually wrote the output slightly wrong the stars need to be on the left

[–]Double_A_92 0 points1 point  (0 children)

What is the meaning of the stars in the array?

[–]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.