Option Base 1
Private Sub C1_Click()
Dim a(100) As Integer
Dim s As Integer
s = 0
Open App.Path & "\" & "in.txt" For Input As #1
Do While Not EOF(1)
For i = 1 To 100
Input #1, a(i)
Text1.Text = Text1.Text & " " & a(i)
If a(i) <= 700 Then
s = s + a(i)
End If
Next
Loop
Close #1
End Sub
in.txt 文件内容如下:
705 533 579 289 301 774 14 760 814 709 45 414 862 790 373 961 871 56 949 364
524 767 53 592 468 298 622 647 263 279 829 824 589 986 910 226 695 980 243 533
106 999 676 15 575 100 103 798 284 45 295 382 300 948 979 401 278 160 162 646
410 412 712 326 633 207 186 583 80 457 905 261 785 378 289 919 631 627 428 97
561 694 913 834 22 543 916 430 677 502 513 462 353 404 269 55 243 979 60 390
请问到底哪里出了问题,以及怎样改进?