September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
|
|
@ -1,29 +1,35 @@
|
|||
program rot13(input, output);
|
||||
program rot13;
|
||||
|
||||
function rot13(someText: string): string;
|
||||
var
|
||||
i: integer;
|
||||
ch: char;
|
||||
resultText: string = '';
|
||||
line: string;
|
||||
|
||||
begin
|
||||
for i := 1 to Length(someText) do begin
|
||||
ch := someText[i];
|
||||
case ch of
|
||||
'A' .. 'M', 'a' .. 'm': ch := chr(ord(ch)+13);
|
||||
'N' .. 'Z', 'n' .. 'z': ch := chr(ord(ch)-13)
|
||||
function rot13(someText: string): string;
|
||||
|
||||
var
|
||||
i: integer;
|
||||
ch: char;
|
||||
result: string;
|
||||
|
||||
begin
|
||||
result := '';
|
||||
for i := 1 to Length(someText) do
|
||||
begin
|
||||
ch := someText[i];
|
||||
case ch of
|
||||
'A' .. 'M', 'a' .. 'm':
|
||||
ch := chr(ord(ch)+13);
|
||||
'N' .. 'Z', 'n' .. 'z':
|
||||
ch := chr(ord(ch)-13);
|
||||
end;
|
||||
result := result + ch;
|
||||
end;
|
||||
rot13 := result;
|
||||
end;
|
||||
resultText := resultText + ch
|
||||
end;
|
||||
rot13 := resultText
|
||||
end;
|
||||
|
||||
var
|
||||
line: string;
|
||||
|
||||
begin
|
||||
while not eof(input) do begin
|
||||
readln(line);
|
||||
writeln(rot13(line))
|
||||
end
|
||||
while not eof(input) do
|
||||
begin
|
||||
readln(line);
|
||||
writeln(rot13(line));
|
||||
end;
|
||||
end.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue