Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,7 +1,7 @@
decl string mode
while (not (or (= mode "encode") (= mode "decode")))
out "encode/decode: " console
set mode (lower (in string console))
out "encode/decode: " console
set mode (lower (in string console))
end while
decl string message
@ -12,17 +12,17 @@ decl int key
out "key: " console
set key (in int console)
if (or (> key 26) (< key 0))
out endl "invalid key" endl console
stop
out endl "invalid key" endl console
stop
end if
if (= mode "decode")
set key (int (- 26 key))
set key (int (- 26 key))
end if
for (decl int i) (< i (size message)) (inc i)
if (and (> (ord message<i>) 64) (< (ord message<i>) 91))
out (chr (int (+ (mod (int (+ (- (ord message<i>) 65) key)) 26) 65))) console
end if
if (and (> (ord message<i>) 64) (< (ord message<i>) 91))
out (chr (int (+ (mod (int (+ (- (ord message<i>) 65) key)) 26) 65))) console
end if
end for
out endl console