Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
26
Task/Stack/M2000-Interpreter/stack-2.m2000
Normal file
26
Task/Stack/M2000-Interpreter/stack-2.m2000
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
Module Checkit {
|
||||
Read a, b
|
||||
Print a, b
|
||||
}
|
||||
\\ add parameters in a FIFO, and this FIFO merged to current stack
|
||||
Push 100
|
||||
Checkit 10, 20
|
||||
Print StackItem(1)=100
|
||||
Module Checkit {
|
||||
Read a, b
|
||||
Print a=20, b=100
|
||||
}
|
||||
Checkit 20
|
||||
|
||||
Function alfa {
|
||||
k=0
|
||||
n=0
|
||||
while not empty {
|
||||
k+=number
|
||||
n++
|
||||
}
|
||||
if n=0 then Error "No parameters found"
|
||||
=k/n
|
||||
}
|
||||
|
||||
Print alfa(1,2,3,4)=2.5
|
||||
Loading…
Add table
Add a link
Reference in a new issue