第一题VB作业的代码怎么写,谢谢
3个回答
展开全部
Private Sub ni_Click()
End Sub
Public Function GetHLS(A() As Integer) As Double
If UBound(A) = 1 Then
GetHLS = A(0, 0) * A(1, 1) - A(0, 1) * A(1, 0)
End If
If UBound(A) > 1 Then
Dim RRes As Double
Dim LRes As Double
Dim CNum As Integer
Dim TNum As Double
Dim i As Integer
RRes = 0
LRes = 0
For i = 0 To UBound(A)
CNum = i
TNum = 1
If i = 0 Then
For j = 0 To UBound(A)
TNum = TNum * A(j, j)
Next j
End If
If i > 0 Then
Call YD(i)
For j = 0 To UBound(A)
TNum = TNum * A(j, cc(j))
Next j
End If
RRes = RRes + TNum
Next i
For i = 0 To UBound(A)
CNum = i
TNum = 1
If i = 0 Then
For j = 0 To UBound(A)
TNum = TNum * A(j, UBound(A) - j)
Next j
End If
If i > 0 Then
Call YD(i)
For j = 0 To UBound(A)
TNum = TNum * A(UBound(A) - j, cc(j))
Next j
End If
LRes = LRes + TNum
Next i
GetHLS = RRes - LRes
End If
End Function
Public Sub YD(N As Integer)
Dim n1 As Integer
n1 = UBound(aa)
ReDim bb(n1)
ReDim cc(n1)
For i = 0 To n1 - N
bb(i) = aa(N + i)
Next
For i = 0 To n1 - N
cc(i) = bb(i)
Next
For i = n1 - N + 1 To n1
cc(i) = aa(i - n1 + N - 1)
Next
End Sub
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
--
2022-12-05 广告
2022-12-05 广告
图形化编程简单理解为用积木块形式编程,scratch和python也是其中的一种,属于入门级编程,以其简单生动的画面获得无数学生的喜爱,深圳市创客火科技有限公司是一家做教育无人机的公司,旗下有编程无人机,积木无人机及室内外编队,每款飞机含有...
点击进入详情页
本回答由--提供
展开全部
什么毛病,求人家帮助,自己还不把图像放正?
追问
难道看不清嘛
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询