Объяснение:
var n, flag, first_digit, current_digit: integer;
begin
readln(n);
flag := 1;
first_digit := n mod 10;
while (n > 0) do
current_digit := n mod 10;
if current_digit <> first_digit then flag = 0;
n := n div 10;
end;
if flag = 1 then writeln("верно") else writeln("неверно");
end.
Объяснение:
var n, flag, first_digit, current_digit: integer;
begin
readln(n);
flag := 1;
first_digit := n mod 10;
while (n > 0) do
begin
current_digit := n mod 10;
if current_digit <> first_digit then flag = 0;
n := n div 10;
end;
if flag = 1 then writeln("верно") else writeln("неверно");
end.