vb中选择法,冒泡,比较法排序的过程分别是什么
1个回答
展开全部
Dim N As Integer
Dim h As Integer
Dim R As Integer
Dim G As Integer
Dim B As Integer
Dim RanInt As Integer
Dim SW1 As Integer
Dim AJ1 As Integer
Dim SW2 As Integer
Dim AJ2 As Integer
Dim SW3 As Integer
Dim AJ3 As Integer
Dim i1 As Integer
Dim j1 As Integer
Dim i2 As Integer
Dim j2 As Integer
Dim i3 As Integer
Dim j3 As Integer
Dim k As Integer
Private Sub Command1_Click()
Call IntColor
Randomize
Shape1(0).Width = 100
Shape1(0).Left = 2000
h = Int(Rnd * 2500 + 500)
Shape1(0).Height = h
Shape1(0).Top = 3035 - h
Shape1(0).FillStyle = 0
Select Case RanInt
Case 0
Shape1(0).FillColor = RGB(255 - CInt((h - 500) * 0.102), G, B)
Case 1
Shape1(0).FillColor = RGB(R, 255 - CInt((h - 500) * 0.102), B)
Case 2
Shape1(0).FillColor = RGB(R, G, 255 - CInt((h - 500) * 0.102))
End Select
Shape2(0).Width = 100
Shape2(0).Left = 2000
Shape2(0).Height = h
Shape2(0).Top = 6170 - h
Shape2(0).FillStyle = 0
Select Case RanInt
Dim h As Integer
Dim R As Integer
Dim G As Integer
Dim B As Integer
Dim RanInt As Integer
Dim SW1 As Integer
Dim AJ1 As Integer
Dim SW2 As Integer
Dim AJ2 As Integer
Dim SW3 As Integer
Dim AJ3 As Integer
Dim i1 As Integer
Dim j1 As Integer
Dim i2 As Integer
Dim j2 As Integer
Dim i3 As Integer
Dim j3 As Integer
Dim k As Integer
Private Sub Command1_Click()
Call IntColor
Randomize
Shape1(0).Width = 100
Shape1(0).Left = 2000
h = Int(Rnd * 2500 + 500)
Shape1(0).Height = h
Shape1(0).Top = 3035 - h
Shape1(0).FillStyle = 0
Select Case RanInt
Case 0
Shape1(0).FillColor = RGB(255 - CInt((h - 500) * 0.102), G, B)
Case 1
Shape1(0).FillColor = RGB(R, 255 - CInt((h - 500) * 0.102), B)
Case 2
Shape1(0).FillColor = RGB(R, G, 255 - CInt((h - 500) * 0.102))
End Select
Shape2(0).Width = 100
Shape2(0).Left = 2000
Shape2(0).Height = h
Shape2(0).Top = 6170 - h
Shape2(0).FillStyle = 0
Select Case RanInt
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询