MRC: Bug

Página 4/4
1 | 2 | 3 |

Por NYYRIKKI

Enlighted (5889)

imagem de NYYRIKKI

27-10-2004, 18:57

Here is also yet another fast pure BASIC version: (I really don't like recursion, but that is my personal problem.)

10 DEFINTA-Y:DIMV(255)
20 L=1:FORI=1TO255:IFS=LTHENS=0:L=L*2
30 V(I)=1+V(S):S=S+1:NEXT
40 OPEN"TODO.TXT"FORINPUTAS#1
50 IFEOF(1)THENCLOSE:OPEN"TODO.PCK"FOROUTPUTAS#1:PRINT#1,Z1:PRINT#1,Z0:END
60 A=ASC(INPUT$(1,1)):Z1=Z1+V(A):Z0=Z0+8-V(A):GOTO50

Por AuroraMSX

Paragon (1902)

imagem de AuroraMSX

28-10-2004, 11:20

I just proven myself I am dumb Wink
I wasn't really paying attention.. It's recursive...

/me wipes yet another item from the TODO list Tongue

Página 4/4
1 | 2 | 3 |