02-03-2003, 06:16 AM
Well now i have an answer for one of the challenges. The encoding one look :o
hehe tx
and anyone that can help me make ths smaller more efficient, ect. plz do
Code:
CLS
start: INPUT "Encode or decode"; f$
g = 1
CLS
INPUT "Input sentence"; a$
CLS
PRINT a$
IF f$ = "decode" THEN g = -1
code: FOR letter = 1 TO LEN(a$)
leter = letter * g
b = ASC(MID$(a$, letter, 1))
b = b + leter
d$ = CHR$(b)
MID$(a$, letter, 1) = d$
NEXT letter
PRINT a$
PRINT
IF f$ = "encode" THEN INPUT "Do you want to decode? y / n "; d$
IF d$ = "y" THEN
CLS
LET f$ = ""
PRINT a$
g = -1
GOTO code
END IF
PRINT
INPUT "Again? y / n "; f$
IF f$ = "y" THEN
CLS
GOTO start
END IF
hehe tx
and anyone that can help me make ths smaller more efficient, ect. plz do