[求助]看看这vb程序
2 Dim x(20), y(20), a(20), m(20)4 For i = 1 To 20
6 x(i) = 0
10 y(i) = 0
20 a(i) = 0
30 Next i
40 INPUT " n=";n
50 INPUT "C(标准试样wg/mg)=";c
60 For i = 1 To n
70 INPUT "V(标准试样ml)=";x(i)
80 INPUT "E(电动势mv)=";y(i)
90 x(i) = x(i) * c / 50
100 x(i) = Log(x(i)) / Log(10)
110 a(1) = a(1) + x(i)
120 a(2) = a(2) + x(i) ^ 2
130 a(3) = a(3) + y(i)
140 a(4) = a(4) + y(i) ^ 2
150 a(5) = a(5) + y(i) * x(i)
160 Next i
170 a(1) = a(1) / n
180 a(3) = a(3) / n
190 a(6) = a(2) - n * a(1) ^ 2
200 a(7) = a(4) - n * a(3) ^ 2
210 a(8) = a(5) - n * a(1) * a(3)
220 a(9) = a(8) / (a(6) * a(7)) ^ 0.5
230 a(10) = a(8) / a(6)
240 a(11) = a(3) - a(10) * a(1)
250 Print "r="; a(9)
260 Print "b="; a(10)
270 Print "a="; a(11)
280 Print "请选择(1/2/3)"
290 Print " 1-测取水样浓度"
300 Print " 2-求本溶液电动势"
310 Print " 3-退出本程序"
320 INPUT "请选择1/2/3=";m(1)
330 If m(1) = 1 Then GoTo 355
340 If m(1) = 2 Then GoTo 410
350 If m(1) = 3 Then End
355 INPUT "L(取样量)=";l
360 INPUT "E(测得电动势mv)=";m(2)
370 m(3) = (m(2) - a(11)) / a(10)
380 m(3) = Exp(m(3) * Log(10))
382 m(8) = m(3) * 50 / l
388 Print "------------------------------"
390 Print "| C(本溶液)="; m(3); "mg/l |"
391 Print "| C(被测液)="; m(8); "mg/l |"
392 Print "------------------------------"
400 GoTo 280
410 INPUT "C(试样浓度mg/ml)=";m(4)
420 m(4) = Log(m(4)) / Log(10)
430 m(5) = a(11) + a(10) * m(4)
440 Print "E(电动势)="; m(5); "mv"
450 GoTo 280