Pastebin

Paste #24823: No description

< previous paste - next paste>

Pasted by Anonymous Coward

Download View as text

var
  s, s1, s2: string;
  len, len_h: integer;
begin
  s := 'helloolleh';
  len := Length(str);
  len_h := len div 2;
  s1 := Copy(s, 1, len_h);
  s2 := Copy(s, len_h+1, len-len_h);
  if s1 = s2 then
    writeln('Palindrome')
  else
    writeln('NOT Palindrome');
end.

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.