Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Rot-13/Maxima/rot-13.maxima
Normal file
19
Task/Rot-13/Maxima/rot-13.maxima
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
rot13(a) := simplode(map(ascii, map(lambda([n],
|
||||
if (n >= 65 and n <= 77) or (n >= 97 and n <= 109) then n + 13
|
||||
elseif (n >= 78 and n <= 90) or (n >= 110 and n <= 122) then n - 13
|
||||
else n), map(cint, sexplode(a)))))$
|
||||
|
||||
lowercase: "abcdefghijklmnopqrstuvwxyz"$
|
||||
uppercase: "ABCDEFGHIJKLMNOPQRSTUVWXYZ"$
|
||||
|
||||
rot13(lowercase);
|
||||
"nopqrstuvwxyzabcdefghijklm"
|
||||
|
||||
rot13(uppercase);
|
||||
"NOPQRSTUVWXYZABCDEFGHIJKLM"
|
||||
|
||||
rot13("The quick brown fox jumps over the lazy dog");
|
||||
"Gur dhvpx oebja sbk whzcf bire gur ynml qbt"
|
||||
|
||||
rot13(%);
|
||||
"The quick brown fox jumps over the lazy dog"
|
||||
Loading…
Add table
Add a link
Reference in a new issue