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.
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos