numbers sorting

Write your question here.

I want the user to input 200 numbers, and my program to sort/find all the different variations of combinations, ie:

25678,72856, 68572, etc

Does anyone have or can writ me a simple program for that?





code]
Put the code you need help with here.
[/code]
First I would recommend that you save the user input to a file and then sort that, however you can have the user input the numbers also, it's just a pain if they get to 199 and have to start over for some reason.

From what I have read, a insert sort may be the easiest/most straight forward method. You can google different methods but the link below describes one.

http://mathbits.com/MathBits/CompSci/Arrays/Insertion.htm

I would also suggest you learn by writing your own code and coming here to ask questions if you have problems.
Check out the next_permutation algorithm in the reference section - top left of this page.

HTH
Thanks for the Info........ I will learn.
Topic archived. No new replies allowed.