07-25-2023, 09:44 AM
program FileIOExample;
var
inputFile: TextFile;
num: Integer;
begin
AssignFile(inputFile, 'input.txt');
Reset(inputFile);
while not Eof(inputFile) do
begin
ReadLn(inputFile, num);
WriteLn('Read number: ', num);
end;
CloseFile(inputFile);
end.
var
inputFile: TextFile;
num: Integer;
begin
AssignFile(inputFile, 'input.txt');
Reset(inputFile);
while not Eof(inputFile) do
begin
ReadLn(inputFile, num);
WriteLn('Read number: ', num);
end;
CloseFile(inputFile);
end.