program Znanija;
var s, a, p: integer;
begin
s := 0;
a := 23;
p := a;
while p>0 do
s:= s+p mod 10;
p:= p div 10;
end;
writeln(s);
end.
Output: 5.
program Znanija;
var s, a, p: integer;
begin
s := 0;
a := 23;
p := a;
while p>0 do
begin
s:= s+p mod 10;
p:= p div 10;
end;
writeln(s);
end.
Output: 5.