tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 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