function sum (n : integer) : integer;
begin
sum := 0;
while n > 0 do
sum := sum + n mod 10;
n := n div 10;
end;
var
a : integer;
repeat
writeln ('a = ');
read (a);
until sum (a) = 10;
writeln ('OK');
end.
var a,a1,a2:integer;beginrepeatwriteln (' Введите число');readln (a);a1:=a div 10;a2:=a mod 10;until (a1+a2=10);writeln ('Верно ');end.
function sum (n : integer) : integer;
begin
sum := 0;
while n > 0 do
begin
sum := sum + n mod 10;
n := n div 10;
end;
end;
var
a : integer;
begin
repeat
writeln ('a = ');
read (a);
until sum (a) = 10;
writeln ('OK');
end.
var
a,a1,a2:integer;
begin
repeat
writeln (' Введите число');
readln (a);
a1:=a div 10;
a2:=a mod 10;
until (a1+a2=10);
writeln ('Верно ');
end.