Pascal.ABC.Net
а)
const n = 9;
var
a : array [0..n] of integer;
b,c,i1 : integer;
r : boolean := false;
begin
readln (b);
While b > 0 do
begin
c := b mod 10;
b := b div 10;
a[c] := a[c] +1;
end;
for i := 0 to n do
if a[i] > 1 then
r :=true;
if r then
writeln ('да')
else
writeln ('нет');
end.
б)
var
l,i : integer;
s : string;
r : boolean := true;
begin
readln (s);
l := Length (s);
for i := 1 to (l div 2) do
if s[i] <> s[l-i+1] then
r := false;
if r then
writeln ('да')
else
writeln ('нет');
end.