Var number:integer; digit:integer; res:boolean; begin readln(number); digit:=number mod 10; number:=number div 10; res:=true; while number>0 do begin if digit<>number mod 10 then begin res:=false; break; end; number:=number div 10; end; if res then writeln('Верно') else writeln('Неверно'); end.
Answers & Comments
Verified answer
Var number:integer;digit:integer;
res:boolean;
begin
readln(number);
digit:=number mod 10;
number:=number div 10;
res:=true;
while number>0 do begin
if digit<>number mod 10 then begin
res:=false;
break;
end;
number:=number div 10;
end;
if res then writeln('Верно') else writeln('Неверно');
end.