|
|
1.1 ! root 1: program bench3(input, output); ! 2: const max=100; ! 3: var i,len: integer; inline: packed array[1..max] of char; palind: Boolean; ! 4: begin ! 5: while not eof do begin ! 6: len := 0; ! 7: while not eoln do ! 8: begin len := len+1; inline[len] := input^; get(input) end; ! 9: readln; ! 10: while (len > 1) and (inline[len] = ' ') do ! 11: len := len - 1; ! 12: palind := true; ! 13: for i := len downto len div 2 do ! 14: if inline[i] <> inline[len-i+1] then ! 15: palind := false; ! 16: for i := 1 to len do write(inline[i]); ! 17: write(' is'); if not palind then write(' not'); ! 18: writeln(' a palindrome'); ! 19: end ! 20: end.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.