There is an error in the VB exam software for future education. Where is the program error?
The reason for the "input beyond the end of the file" error is not the program, but that your program is correct. The fundamental reason is that in the input file "datain 1.txt", there must be 100 integers at the beginning, which can be separated by spaces or wrapped, but not less than 100 integers! Please check the contents of the datain 1.txt file.