Program EvenNumbers;
VarinputFile, outputFile: Text;number: Integer;
BeginAssign(inputFile, 'Input.txt');Reset(inputFile);
Assign(outputFile, 'Output.txt');Rewrite(outputFile);
While not Eof(inputFile) dobeginReadln(inputFile, number);if number mod 2 = 0 thenWriteln(outputFile, number);end;
Close(inputFile);Close(outputFile);End.
Program EvenNumbers;
Var
inputFile, outputFile: Text;
number: Integer;
Begin
Assign(inputFile, 'Input.txt');
Reset(inputFile);
Assign(outputFile, 'Output.txt');
Rewrite(outputFile);
While not Eof(inputFile) do
begin
Readln(inputFile, number);
if number mod 2 = 0 then
Writeln(outputFile, number);
end;
Close(inputFile);
Close(outputFile);
End.