|
|
back to boardWhat a problem with my code, help please.. It`s my Pascal code: type mass=array[1..101] of shortint; var i,j,j1:integer; s:string[101]; m1:mass; begin read(s); j1:=length(s); for i:=1 to j1 do begin m1[i]:=ord(s[i])-97; end; j:=5; for i:=1 to j1 do begin if m1[i]>=j-1 then begin m1[i]:=m1[i]-j; j:=m1[i]+j; end else begin m1[i]:=m1[i]+26-j; j:=m1[i]-26+j end end; for i:=1 to j1 do write(chr(m1[i]+97)); end. Give me some tests were my program will give wrong answer.. |
|
|