Private Sub Command1_Click()
Dim byear As Single
Dim avgmtime(1900 To 2100) As Single
Dim avgftime(1900 To 2100) As Single
Dim avgmtime1(1900 To 2100) As Single
Dim avgftime1(1900 To 2100) As Single
Dim avgmtime2(1900 To 2100) As Single
Dim avgftime2(1900 To 2100) As Single
Dim a1 As Single
Dim a2 As Single
Open "c:/stream/gdata/男子平均加入年数1.txt " For Input As #1
Do Until EOF(1)
Input #1, a1, a2
byear = a1
avgmtime1(byear) = a2
Loop
Close #1
Open "c:/stream/gdata/女子平均加入年数1.txt " For Input As #2
Do Until EOF(2)
Input #2, a1, a2
byear = a1
avgftime1(byear) = a2
Loop
Close #2
Open "c:/stream/gdata/男子平均加入年数2.txt " For Input As #3
Do Until EOF(3)
Input #3, a1, a2
byear = a1
avgmtime2(byear) = a2
Loop
Close #3
Open "c:/stream/gdata/女子平均加入年数2.txt " For Input As #4
Do Until EOF(4)
Input #4, a1, a2
byear = a1
avgftime2(byear) = a2
Loop
Close #4
For byear = 1950 To 1984
avgmtime(byear) = avgmtime2(byear)
avgftime(byear) = avgftime2(byear)
Next
For byear = 1985 To 2034
avgmtime(byear) = avgmtime1(byear)
avgftime(byear) = avgftime1(byear)
Next
Open "c:/stream/gdata/平均加入年数.txt " For Output As #5
For byear = 1900 To 2100
Write #5, byear, avgmtime(byear), avgftime(byear)
Next
Close #5
End Sub
最終更新:2009年04月18日 00:47