Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,30 @@
|
|||
OPTION BASE 1
|
||||
LET max = 10
|
||||
DIM dat(10), res(10)
|
||||
FOR i = 1 TO max
|
||||
READ dat(i)
|
||||
NEXT i
|
||||
|
||||
DATA 1, 2, 1, 4, 5, 2, 15, 1, 3, 4
|
||||
|
||||
LET res(1) = dat(1)
|
||||
LET count = 1
|
||||
LET posic = 1
|
||||
DO WHILE posic < max
|
||||
LET posic = posic + 1
|
||||
LET esnuevo = 1
|
||||
LET indice = 1
|
||||
DO WHILE (indice <= count) AND esnuevo = 1
|
||||
IF dat(posic) = res(indice) THEN LET esnuevo = 0
|
||||
LET indice = indice + 1
|
||||
LOOP
|
||||
IF esnuevo = 1 THEN
|
||||
LET count = count + 1
|
||||
LET res(count) = dat(posic)
|
||||
END IF
|
||||
LOOP
|
||||
|
||||
FOR i = 1 TO count
|
||||
PRINT res(i);
|
||||
NEXT i
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue