0
There is no response after the launch, but just an empty window, as if I didn't write writeln, but just launched begin and end.
I wrote the code on the computer and ran it there The file is located in the same place as the project so it's not about the file and the file is definitely the right one And here is the code : begin var (min, maxinstr):=(9999999999,0); var s,maxc:string; var f:text; assign(f,'24 (1).txt'); reset(f); while not eof(f) do begin readln(f,s); if s.CountOf('G') < min then begin min:=s.CountOf('G'); for var abc := 'Z' to 'A' do begin if maxinstr < s.CountOf(abc) then begin maxc:=abc; end; end; end; end; writeln(maxc); close(f); end.
1 Answer
+ 4
This will help you:
https://wiki.freepascal.org/File_Handling_In_Pascal