Nope, it was random. First try: 6th score, second try: 9th, third try: 5th and ...
Try it again. It will always output the 6th score that you enter (I don't mean 6th highest or 6th lowest; I mean 6th in order of entry), because you set i = 5. score[5] is the 6th element of the array.