RosettaCodeData/Task/Rot-13/Pop11/rot-13.pop11
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

14 lines
382 B
Text

define rot13(s);
lvars j, c;
for j from 1 to length(s) do
s(j) -> c;
if `A` <= c and c <= `M` or `a` <= c and c <= `m` then
c + 13 -> s(j);
elseif `N` <= c and c <= `Z` or `n` <= c and c <= `z` then
c - 13 -> s(j);
endif;
endfor;
s;
enddefine;
rot13('NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm') =>