home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug003.arc
/
JRTPAS-1.LBR
/
INTRO03A.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1979-12-31
|
384b
|
20 lines
(*
This is Example 3A, page 10, PItP:
*)
program ex3a;
var sum,number : integer;
begin
writeln('Input numbers to be added: 0 ends input.');
sum := 0; (* Clear to start *)
repeat
read(number);
sum := sum + number
until number = 0;
writeln('The total is: ',sum)
end.