fork download
  1. var
  2. number, sum: integer;
  3.  
  4. begin
  5. sum := 0;
  6. number := 8267;
  7.  
  8. repeat
  9. while number <> 0 do begin
  10. sum := sum + (number mod 10);
  11. number := number div 10
  12. end
  13. until (sum / 10) <> 0;
  14.  
  15. writeln(sum)
  16. end.
Success #stdin #stdout 0s 288KB
stdin
Standard input is empty
stdout
23