Program palindrom; Uses crt; var s: string; i,f: byte; begin clrscr; write('String: '); readln(s); f := 0; for i := 1 to length(s) div 2 do if s[i] <> s[length(s)-i+1] then begin writeln('No palindrome'); f := 1; break end; if f = 0 then write('Palindrome'); readln end.
Uses crt;
var s: string;
i,f: byte;
begin
clrscr;
write('String: ');
readln(s);
f := 0;
for i := 1 to length(s) div 2 do if s[i] <> s[length(s)-i+1] then begin writeln('No palindrome');
f := 1;
break
end;
if f = 0 then write('Palindrome');
readln
end.