Dim a (10000) As a Double
Open "F: \ wj12. TXT" For Input As # 1
For I=1 To 10000
Input # 1, a (I)
Next I
For I=1 To 9999
For j=1 To 10000 - I
If a (j) & gt; A (j + 1) Then t=a (j) : a (j)=a (j + 1) : a (j + 1)=t
Next j
Next I
For I=5001 To 5200
S=s + a (I)
Next I
Avg=s/200
Print Avg
For I=5001 To 5200
If a (I) & gt; Avg Then Print a (I)
Next I
Close All
Before practice melody: they % & gt; _<% % & gt; _<%
CodePudding user response:
What format file is?Dim (1 To 10000) As a Double, s As Double, Avg As a Double
Open "F: \ wj12. TXT" For Input As # 1
For I=1 To 10000
Input # 1, a (I)
Next I
Close # 1
For I=1 To 9999
For j=I To 10000
If a (I) & gt; A Then s (j)=a (I) : a (I)=a (j) : a (j)=s
Next j
Next I
For I=5001 To 5200
S=s + a (I)
Next I
Avg=s/200
Text1. Text=Avg
S=0
For I=5001 To 5200
If a (I) & gt; Avg Then s=s + 1
Next I
Text2. Text=s
CodePudding user response:
The great spirit is TXT formatCodePudding user response:
Is to ask your text data format, such as whether each data line?