| User: editor -- 2011-03-24 << 743 745 >> |
| Hits: 3848 |
| Type: Text sort |
| Search all Text sort examples |
| Description: |
| How to sort a serial of numbers, by the order of the value of following functions: abs(number-10). The number that is closer to 10 will have a higher order. |
| Input Sample: |
| 9 12 20 18 0 7 4 5 10 21 6 8 13 22 |
| Output Sample: |
| 10 9 12 8 7 13 6 5 4 18 20 0 21 22 |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
| 1. ctrl-o open the text file that contains numbers 2. ctrl-h open 'replace' dialog * set 'replace with pattern' to: * click 'advanced' tab * set 'run following at the beginning of replace' to: 3. click 'replace', done! |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |