Display from highest to lowest using arr
Display from highest to lowest using arrays
Feb 19, 2014 at 9:43am UTC
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 :)
Feb 19, 2014 at 10:01am UTC
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.
Feb 19, 2014 at 11:11am UTC
Can you explain me this "bubble sort" algorithm?
Feb 19, 2014 at 12:13pm UTC
Topic archived. No new replies allowed.
General C++ Programming
© cplusplus.com, 2000-2015 - All rights reserved -
Spotted an error? contact us