Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
35
Task/Sort-three-variables/EasyLang/sort-three-variables.easy
Normal file
35
Task/Sort-three-variables/EasyLang/sort-three-variables.easy
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
proc sort3 . a b c .
|
||||
if a > c
|
||||
swap a c
|
||||
.
|
||||
if b > c
|
||||
swap b c
|
||||
.
|
||||
if a > b
|
||||
swap a b
|
||||
.
|
||||
.
|
||||
x = 77444
|
||||
y = -12
|
||||
z = 0
|
||||
sort3 x y z
|
||||
print x & " " & y & " " & z
|
||||
#
|
||||
proc sort3str . a$ b$ c$ .
|
||||
if strcmp a$ c$ > 0
|
||||
swap a$ c$
|
||||
.
|
||||
if strcmp b$ c$ > 0
|
||||
swap b$ c$
|
||||
.
|
||||
if strcmp a$ b$ > 0
|
||||
swap a$ b$
|
||||
.
|
||||
.
|
||||
x$ = "lions, tigers, and"
|
||||
y$ = "bears, oh my!"
|
||||
z$ = "(from the \"Wizard of OZ\")"
|
||||
sort3str x$ y$ z$
|
||||
print x$
|
||||
print y$
|
||||
print z$
|
||||
Loading…
Add table
Add a link
Reference in a new issue