September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -0,0 +1,21 @@
CONST lc$ = "abcdefghijklmnopqrstuvwxyz"
CONST uc$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
CONST txt$ = "The quick brown fox jumps over the lazy dog."
FUNCTION Ceasar$(t$, k)
lk$ = MID$(lc$ & lc$, k+1, 26)
uk$ = MID$(uc$ & uc$, k+1, 26)
RETURN REPLACE$(t$, lc$ & uc$, lk$ & uk$, 2)
END FUNCTION
tokey = RANDOM(25)+1
PRINT "Encrypting text with key: ", tokey
en$ = Ceasar$(txt$, tokey)
PRINT "Encrypted: ", en$
PRINT "Decrypted: ", Ceasar$(en$, 26-tokey)