vb怎样将该程序运行结果反序排列
3个回答
2016-06-09
展开全部
Private Sub Command1_Click()
Dim a As Integer, b As Integer, c
a = Len(Text1.Text): b = 0
c = 1
Do While c <= a
b = CInt(Mid(Text1.Text, c, 1) * 2 ^ (a - c)) + b
c = c + 1
Loop
Text2.Text = Str(b)
End Sub
Dim a As Integer, b As Integer, c
a = Len(Text1.Text): b = 0
c = 1
Do While c <= a
b = CInt(Mid(Text1.Text, c, 1) * 2 ^ (a - c)) + b
c = c + 1
Loop
Text2.Text = Str(b)
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
只要改一个地方:
b = b + Str(a mod 2)
改为:
b = Str(a mod 2) + b
b = b + Str(a mod 2)
改为:
b = Str(a mod 2) + b
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询