Member Avatar for r.stiltskin

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.