cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Display from highest to lowest using arr
Display from highest to lowest using arrays
Feb 19, 2014 at 9:43am UTC
micros24
(6)
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
lorilew
(12)
Hi, do you want to sort the array? Simple algorithms are the bubble sort and the insertion sort. I have examples here:
http://cppgo.wordpress.com/2014/01/29/bubble-sort-algorithm/comment-page-1/#comment-11
This is another example, the user inputs how many pancakes they're eaten, and then I sort, and output in order.
http://cppgo.wordpress.com/2014/01/29/pancake-glutton/
Feb 19, 2014 at 11:11am UTC
micros24
(6)
Can you explain me this "bubble sort" algorithm?
Feb 19, 2014 at 12:13pm UTC
keskiverto
(10402)
http://en.wikipedia.org/wiki/Bubble_sort
Topic archived. No new replies allowed.