13 lines
231 B
Text
13 lines
231 B
Text
with(stack): # load the package, to allow use of short command names
|
|
|
|
s := stack:-new(a, b):
|
|
|
|
push(c, s):
|
|
|
|
# The following statements terminate with a semicolon and print output.
|
|
top(s);
|
|
pop(s);
|
|
pop(s);
|
|
empty(s);
|
|
pop(s);
|
|
empty(s);
|