# Thread: Putting in order scanned numbers?

1. ## Putting in order scanned numbers?

If I scan 10 numbers, how I put them in increasing order?

2. There's a bunch of ways to do this, look up "sorting algorithms" on Wikipedia. The easiest is probably to do something like this:

Code:
```int numbers[10]; //Containing your numbers

int min = numbers[0];

for(int i = 0; i < 10; i++) {
for(int j = i; j < 10; j++)
MIN(numbers[j], min);
if(min != numbers[i])
//Swap the two with a temp variable
}```

3. We're not here to do your homework for you. Give it a shot and we will give help when you get stuck and have a specific question.

Of course you would have known this if you had read the Announcement at the top of the thread list.

4. Y don't you give it a shot.. and come back with the problems.. you face.. rather than expecting us to do the homework.. ??

If your intestion is to learn.. then.. you need to change your ways.. !!

5. You type like William Shatner talks.

Quzah.

6. Kirk: Spock - what is it?
Spock: It's code captain, but not as we know it.