求助VB高手编一个程序,急!

2024-12-26 05:04:27
推荐回答(1个)
回答1:

Dim x(14) As Single, g(14, 14) As Single
x(0) = 0
For i = 1 To 14
x(i) = x(i - 1) + 1 / 2 * (50 + 50)
Print x(i)
Next i

For i = 1 To 14
For j = 1 To 14

If x(i) > x(j) Then
g(i, j) = 1400 ^ 3 / (6 * 206000 * 11984224.91) * ((x(j) / 1400) ^ 2 * ((3 * x(i) - x(j)) / 1400) + (1 + 0.29) * (125 / 1400) ^ 2 * (x(j) / 1400))
Else
g(i, j) = 1400 ^ 3 / (6 * 206000 * 11984224.91) * ((x(i) / 1400) ^ 2 * ((3 * x(j) - x(i)) / 1400) + (1 + 0.29) * (125 / 1400) ^ 2 * (x(i) / 1400))
End If
Next j
Next i
For i = 1 To 14
For j = 1 To 14
Print g(i, j);
Next j
Print
Next i