jremington:
You MAY NOT store a value in results[5], but the damage is already done by the time you check if (i>4).
OOH I see I'm overflowing the array because I don't make sure i is below 5 until after I add. I changed it to i>=4 and it now works. I feel kinda stupid that should have been more obvious haha. It was confusing me because the prints under it were working, so I thought that something in the if was wrong.
Thank you guys so much for your help!