June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
4
Task/Sort-an-integer-array/Red/sort-an-integer-array.red
Normal file
4
Task/Sort-an-integer-array/Red/sort-an-integer-array.red
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
>> nums: [3 2 6 4 1 9 0 5 7]
|
||||
== [3 2 6 4 1 9 0 5 7]
|
||||
>> sort nums
|
||||
== [0 1 2 3 4 5 6 7 9]
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
. clear
|
||||
. matrix a=(2,9,4,7,5,3,6,1,8)'
|
||||
. qui svmat a
|
||||
. sort a
|
||||
. list
|
||||
|
||||
+----+
|
||||
| a1 |
|
||||
|----|
|
||||
1. | 1 |
|
||||
2. | 2 |
|
||||
3. | 3 |
|
||||
4. | 4 |
|
||||
5. | 5 |
|
||||
|----|
|
||||
6. | 6 |
|
||||
7. | 7 |
|
||||
8. | 8 |
|
||||
9. | 9 |
|
||||
+----+
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
. local a 2 9 4 7 5 3 6 1 8
|
||||
. di "`: list sort a'"
|
||||
1 2 3 4 5 6 7 8 9
|
||||
Loading…
Add table
Add a link
Reference in a new issue