vb列出10个数和10个数分别通过某公式运算,在文本框里列出所有可能 100
vb列出10个数和10个数分别通过某公式运算,在文本框里列出所有可能第一个text里输入9个数,比如123456789,第二个text里输入9个数,比如123456789...
vb列出10个数和10个数分别通过某公式运算,在文本框里列出所有可能第一个text里输入9个数,比如123456789,第二个text里输入9个数,比如123456789,然后第三个text里列出所有它们分别相乘的结果
展开
2个回答
展开全部
Private Function GetMinA(a() As Integer) As Double
Dim sum As Double
Dim n As Integer
Dim Avg As Double
n = UBound(a)
sum = 0
For i = 0 To n
sum = sum + a(i)
Next i
Avg = (sum / n) * 0.8
Dim x() As Double
Dim co As Integer
co = 0
For i = 0 To n
If a(i) > Avg Then
ReDim Preserve x(co)
x(co) = a(i)
co = co + 1
End If
Next i
Dim Res As Double
Res = x(0)
For i = 1 To co - 1
If x(i) < Res Then Res = x(i)
Next i
GetMinA = Res
End Function
还有一个函数要加进去
刚才那个地方贴进去的时候 超过最大值了 粘贴不进去了
在这里粘贴下,需要工程 你留下邮箱 我发给你
2017-02-14
展开全部
Private Sub Command1_Click()
Dim A() As Integer
Dim B() As Integer
Text3 = ""
For i = 0 To Len(Text1) - 1
ReDim Preserve A(i)
A(i) = Mid(Text1, i + 1, 1)
Next
For i = 0 To Len(Text2) - 1
ReDim Preserve B(i)
B(i) = Mid(Text2, i + 1, 1)
Next
For i = 0 To UBound(A)
For j = 0 To UBound(B)
Text3 = Text3 & ";" & A(i) * B(j)
Next
Next
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询