怎么将z转到a(psacl)

P1914 小书童——凯撒密码

wujiansen @ 2017-08-03 20:51:53

同标题:怎么将z转到a(psacl)


by Niscet @ 2017-08-03 21:13:13

是pascal吧


by wujiansen @ 2017-08-03 21:19:50


by wujiansen @ 2017-08-03 21:20:26

打错了,别在意细节


by wujiansen @ 2017-08-03 21:26:00

var
ch:char;
s,t,n:longint;
begin
readln(n);
repeat
read(ch);
s:=ord(ch)+n;
if s>122 then 
begin
s:=t-122;
writeln(97+t);
end;
if s<=122 then 
begin
write(chr(s));
end;
until(eoln);
end.
60分为什么

by 爱编程 @ 2017-08-04 20:17:04

var s:string;
     g:char;
     i,m,n:integer;
begin 
 readln(n);
 read(s);
 for i:=1 to length(s) do
 begin 
  g:=s[i];
  m:=ord(g)+n;
  if m>122 then m:=m-26;
  write(chr(m));
  m:=0;
  end;
end.

by 爱编程 @ 2017-08-04 20:19:00

t是干什么的


|