Объяснение:
var
num, num_work:integer;
a1, a2, a3, a4:integer;
begin
//num:=5225;
readln(num);
num_work:=num;
a1:=num_work div 1000;
num_work:=num_work mod 1000;
a2:=num_work div 100;
num_work:=num_work mod 100;
a3:=num_work div 10;
num_work:=num_work mod 10;
a4:=num_work;
if ((a1 = a4) and (a2 = a3)) then writeln('Да') else writeln('Нет');
end.
Объяснение:
var
num, num_work:integer;
a1, a2, a3, a4:integer;
begin
//num:=5225;
readln(num);
num_work:=num;
a1:=num_work div 1000;
num_work:=num_work mod 1000;
a2:=num_work div 100;
num_work:=num_work mod 100;
a3:=num_work div 10;
num_work:=num_work mod 10;
a4:=num_work;
if ((a1 = a4) and (a2 = a3)) then writeln('Да') else writeln('Нет');
end.