fork download
  1. program sumofunknown;
  2. var
  3. x:integer;
  4. sum:integer;
  5. Begin
  6. Repeat
  7. Write('Enter a number <0 to quit>:');
  8. Readln(x);
  9. sum:=sum+x;
  10. UNTIL x=0;
  11. Writeln('The sum of all numbers:',sum);
  12. readln;
  13. End.
  14.  
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
Enter a number <0 to quit>:The sum of all numbers:0