Here are some useful troubleshooting tips that might help you understand what is going wrong (and better understand the point Wouter and Jesper make). These are useful things you can use in this situation, and in the future when your code is not doing what you are expecting. Try to do one, or both, of the following:
1. Change your loop as follows:
This will let you know where you are in the loop as things are printed out. It will shed some light onto what is happening. How many times are you looping? Is this the nubmer of times you are expecting.
2. Try changing the output so you place each array value in a single quote.
This way you can see for sure what the value of b[i] is. Is it what you are expecting?
These tips should help you see the issue.
Also carefully reread Jesper's post from Dec 4 @ 2:44PM. It explains what the problem is. Attention to detail is a critical skill to develop as a programmer.
>