Hello,I have question about arrays.I know how to input array with for loop but i have to learn how to input array like this:
n - number of elements
we've got index and score of player and i have to sort it from the biggest.I did all good but i stuck on one thing.
Ex: n=3
index score
1 20
2 30
3 10
it has to output
2 30
1 20
3 10
but my program's output is:
1 30
2 20
3 10
I need code that make this index follow my score.
Thank you
n - number of elements
we've got index and score of player and i have to sort it from the biggest.I did all good but i stuck on one thing.
Ex: n=3
index score
1 20
2 30
3 10
it has to output
2 30
1 20
3 10
but my program's output is:
1 30
2 20
3 10
I need code that make this index follow my score.
Thank you
Comment