Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,21 @@
DIM test(9)
test() = 4, 65, 2, -31, 0, 99, 2, 83, 782, 1
PROCinsertionsort(test(), 10)
FOR i% = 0 TO 9
PRINT test(i%) ;
NEXT
PRINT
END
DEF PROCinsertionsort(a(), n%)
LOCAL i%, j%, t
FOR i% = 1 TO n%-1
t = a(i%)
j% = i%
WHILE j%>0 AND t<a(ABS(j%-1))
a(j%) = a(j%-1)
j% -= 1
ENDWHILE
a(j%) = t
NEXT
ENDPROC