Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
24
Task/Vigen-re-cipher/EasyLang/vigen-re-cipher.easy
Normal file
24
Task/Vigen-re-cipher/EasyLang/vigen-re-cipher.easy
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
proc encr txt$ pw$ d . r$ .
|
||||
r$ = ""
|
||||
txt$[] = strchars txt$
|
||||
for c$ in strchars pw$
|
||||
pw[] &= strcode c$ - 65
|
||||
.
|
||||
for c$ in txt$[]
|
||||
c = strcode c$
|
||||
if c >= 97
|
||||
c -= 32
|
||||
.
|
||||
if c >= 65 and c <= 97
|
||||
pwi = (pwi + 1) mod1 len pw[]
|
||||
c = (c - 65 + d * pw[pwi]) mod 26 + 65
|
||||
r$ &= strchar c
|
||||
.
|
||||
.
|
||||
.
|
||||
s$ = "Beware the Jabberwock, my son! The jaws that bite, the claws that catch!"
|
||||
pw$ = "VIGENERECIPHER"
|
||||
call encr s$ pw$ 1 r$
|
||||
print r$
|
||||
call encr r$ pw$ -1 r$
|
||||
print r$
|
||||
Loading…
Add table
Add a link
Reference in a new issue