已知在正文文件zhengda1.txt中共有50个记录(每个记录为1行),
每个记录只有一个用xx.xx表示的实数,将第15个数取出显示。
文件zhengda1.txt:
17.31
20.36
16.22
70.59
11.51
17.29
67.39
72.30
35.46
10.68
88.21
40.07
51.57
18.09
9.42
11.38
16.19
36.51
54.31
26.14
26.40
59.62
84.88
83.99
18.25
26.88
84.56
18.46
3.81
71.93
91.43
15.33
13.71
32.17
26.01
88.47
21.89
85.21
25.96
82.15
80.76
52.53
16.44
77.59
75.73
29.75
56.13
12.92
12.03
24.32
參考答案:Private Sub Command1_Click()
Open "c:\zhengda1.txt" For Input As #1
For i = 1 To 15
Line Input #1, a
Next i
Close #1
Print a
End Sub