Display from highest to lowest using arrays

I need help of how do you output the highest to lowest(not highest and lowest) using arrays from user input. I have no idea but to use for loops and if statements. And also to put prefixes. Sample output:

Person 10: 9
Person 2: 7
Person 7: 5

Something like that, thanks in advance :)
Hi, do you want to sort the array? Simple algorithms are the bubble sort and the insertion sort. I have examples here:


This is another example, the user inputs how many pancakes they're eaten, and then I sort, and output in order.

Can you explain me this "bubble sort" algorithm?
Topic archived. No new replies allowed.