Mine
public text v1 · immutableuses
crt;
var
indata : text;
num : integer;
sum : real;
begin
clrscr;
assign(indata, 'e:numbers.txt');
reset(indata);
sum := 0;
while not eof do
begin
read(indata, num);
If NOT odd(num) = true
then
sum := sum + num
else
sum := sum
end;
writeln('The sum of the even numbers in this file is ',sum,'.');
close(indata);
end.