Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
21
Task/Stack/EasyLang/stack.easy
Normal file
21
Task/Stack/EasyLang/stack.easy
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
stack[] = [ ]
|
||||
proc push v . .
|
||||
stack[] &= v
|
||||
.
|
||||
func pop .
|
||||
if len stack[] = 0
|
||||
return 0
|
||||
.
|
||||
r = stack[-1]
|
||||
len stack[] -1
|
||||
return r
|
||||
.
|
||||
func empty .
|
||||
return if len stack[] = 0
|
||||
.
|
||||
push 2
|
||||
push 11
|
||||
push 34
|
||||
while empty = 0
|
||||
print pop
|
||||
.
|
||||
Loading…
Add table
Add a link
Reference in a new issue