Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
21
Task/Sort-three-variables/Ring/sort-three-variables-1.ring
Normal file
21
Task/Sort-three-variables/Ring/sort-three-variables-1.ring
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Project : Sort three variables
|
||||
|
||||
x = 'lions, tigers, and'
|
||||
y = 'bears, oh my!'
|
||||
z = '(from the "Wizard of OZ")'
|
||||
sortthree(x,y,z)
|
||||
x = 77444
|
||||
y = -12
|
||||
z = 0
|
||||
sortthree(x,y,z)
|
||||
|
||||
func sortthree(x,y,z)
|
||||
str = []
|
||||
add(str,x)
|
||||
add(str,y)
|
||||
add(str,z)
|
||||
str = sort(str)
|
||||
see "x = " + str[1] + nl
|
||||
see "y = " + str[2] + nl
|
||||
see "z = " + str[3] + nl
|
||||
see nl
|
||||
16
Task/Sort-three-variables/Ring/sort-three-variables-2.ring
Normal file
16
Task/Sort-three-variables/Ring/sort-three-variables-2.ring
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
x = 77444
|
||||
y = -12
|
||||
z = 0
|
||||
sList = sortList(x, y, z)
|
||||
see sList + nl
|
||||
|
||||
x = 'lions, tigers, and'
|
||||
y = 'bears, oh my!'
|
||||
z = '(from the "Wizard of OZ")'
|
||||
sList = sortList(x, y, z)
|
||||
see sList + nl
|
||||
|
||||
func sortList (x, y, z)
|
||||
aList = [x, y, z]
|
||||
sList = sort(aList)
|
||||
return sList
|
||||
Loading…
Add table
Add a link
Reference in a new issue