Răspuns:
program palindroame;
var n, i, num, gasit, pal, copie: integer;
begin
write('n='); read(n);
writeln('introdu ',n,' numere naturale separate prin spatiu:');
gasit:=0;
for i:=1 to n do
begin
read (num);
copie:=num;
pal:=0;
while (copie>0) do
begin
pal:=pal*10+(copie mod 10);
copie:=copie div 10;
end;
if (pal=num) then
begin gasit:=1; write (num,' '); end;
end;
writeln;
writeln('au fost afisate palindroame...');
if (gasit=0) then writeln('upss.. nu exista');
end.
Explicație: