101684381qwe @ 2017-03-08 15:52:30
var
a:array[1..10000]of longint;
i,n:longint;
str1:string;
begin
readln(n);
readln(str1);
for i:=1 to length(str1) do begin
a[i]:=ord(str1[i])+n;
end;
for i:=1 to length(str1) do write(chr(a[i]));
end.
by SSL_lzx @ 2017-03-08 16:11:40
“且密码是由一串字母每个向后移动n为形成。z的下一个字母是a”你过了z之后要重新回到a循环,在循环里加一条“if a[i]>122 then a[i]:=a[i]-26;”