VB数组移位
PrivateSubForm_Click()Dima(1To7)AsIntegerFori=1To7a(i)=i’赋初值,生成第一个标准数组Printa(i);Nexti...
Private Sub Form_Click()
Dim a(1 To 7) As Integer
For i = 1 To 7
a(i) = i ’赋初值,生成第一个标准数组
Print a(i);
Next i
Print
For i = 1 To 7
t = ’最右1为暂存
For j = 6 To 1 Step -1
’其余6位向右移一位
Next j
’暂存的移入最左
For j = 1 To 7
Print a(j);
Next j
Print
Next i
End Sub
求 展开
Dim a(1 To 7) As Integer
For i = 1 To 7
a(i) = i ’赋初值,生成第一个标准数组
Print a(i);
Next i
For i = 1 To 7
t = ’最右1为暂存
For j = 6 To 1 Step -1
’其余6位向右移一位
Next j
’暂存的移入最左
For j = 1 To 7
Print a(j);
Next j
Next i
End Sub
求 展开
展开全部
Private Sub Command1_Click()
Dim a(1 To 7) As Integer
For i = 1 To 7
a(i) = i '赋初值,生成第一个标准数组
Print a(i);
Next i
Print
For i = 1 To 7
t = a(7) '最右1为暂存
For j = 6 To 1 Step -1
a(j + 1) = a(j) '其余6位向右移一位
Next j
a(1) = t '暂存的移入最左
For j = 1 To 7
Print a(j);
Next j
Print
Next i
End Sub
Dim a(1 To 7) As Integer
For i = 1 To 7
a(i) = i '赋初值,生成第一个标准数组
Print a(i);
Next i
For i = 1 To 7
t = a(7) '最右1为暂存
For j = 6 To 1 Step -1
a(j + 1) = a(j) '其余6位向右移一位
Next j
a(1) = t '暂存的移入最左
For j = 1 To 7
Print a(j);
Next j
Next i
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询