Var S, N: integer;
Begin
ReadLn(N);
S := 0;
while n > 10 do
begin
S := S + N mod 10;
N := N div 10;
end;
WriteLn(S)
End.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Var S, N: integer;
Begin
ReadLn(N);
S := 0;
while n > 10 do
begin
S := S + N mod 10;
N := N div 10;
end;
WriteLn(S)
End.