Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
15
Task/Catamorphism/ZX-Spectrum-Basic/catamorphism.basic
Normal file
15
Task/Catamorphism/ZX-Spectrum-Basic/catamorphism.basic
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
10 DIM a(5)
|
||||
20 FOR i=1 TO 5
|
||||
30 READ a(i)
|
||||
40 NEXT i
|
||||
50 DATA 1,2,3,4,5
|
||||
60 LET o$="+": GO SUB 1000: PRINT tmp
|
||||
70 LET o$="-": GO SUB 1000: PRINT tmp
|
||||
80 LET o$="*": GO SUB 1000: PRINT tmp
|
||||
90 STOP
|
||||
1000 REM Reduce
|
||||
1010 LET tmp=a(1)
|
||||
1020 FOR i=2 TO 5
|
||||
1030 LET tmp=VAL ("tmp"+o$+"a(i)")
|
||||
1040 NEXT i
|
||||
1050 RETURN
|
||||
Loading…
Add table
Add a link
Reference in a new issue