1.
2.
3.
4.
5.
' 提供给考生的程序
Option Base 1
Dim Arr1(20) As Integer
Dim Arr2(20) As Integer
' 提供给考生的程序
Sub ReadData1()
Open App.Path & "\" & "datain1.txt" For Input As #1
For i = 1 To 20
Input #1, Arr1(i)
Next i
Close #1
End Sub
' 提供给考生的程序
Sub ReadData2()
Open App.Path & "\" & "datain2.txt" For Input As #1
For i = 1 To 20
Input #1, Arr2(i)
Next i
Close #1
End Sub
' 提供给考生的程序
Sub WriteData(Filename As String, Num As Integer)
Open App.Path & "\" & Filename For Output As #1
Print #1, Num
Close #1
End Sub
6.
7.
8.
9.
10.
' 提供给考生的程序
Option Base 1
Dim Arr1(20) As Integer
Dim Arr2(20) As Integer
Sub ReadData1()
Open App.Path & "\" & "datain1.txt" For Input As #1
For i = 1 To 20
Input #1, Arr1(i)
Next i
Close #1
End Sub
Sub ReadData2()
Open App.Path & "\" & "datain2.txt" For Input As #1
For i = 1 To 20
Input #1, Arr2(i)
Next i
Close #1
End Sub