Curious Conditional Conundrum

Yup, thanks for the advice! I tried this and it worked. I guess at this point I am just curious why it failed before. In other words, why reading a[16] and L[16] would cause if(i == 16) to fail.