hello guys, i have been thinking for a while on how to print the some numbers.
For example i want to ask the user, how many numbers he is going to use and then when he gives me the N number and the rest of them(eg: 5 numbers? 4, 5,8,10,456...) and then i want the to sort them from the bigger one to the smallest one
I just want the idea ( i don't know much about the libraries yet and stuff so if you are going to write a pseudo code or something do it simple please thanks :))
This "idea" is rather complex. There are countless sorting algorithms out there. Whenever I need to sort numbers I usually use a quick sort because it is easy to implement and in almost all cases, very fast. http://en.wikipedia.org/wiki/Quicksort
If you're only going to be sorting a few numbers (like 5), then going with a less efficient sort like a bubble sort is perfectly okay, but even when you're sorting say 10 numbers, you will be making far more comparisons in a bubble sort than a quick sort.
You can also use the STL libraries sort function if you store the numbers in a container.