VB 输入一个三位整数,并将其逆序输出。例如:输入123,输出321 求问过程错哪里了
PrivateSubLabel1_Click()DimxAsDoubleDimyAsDoubleDimzAsDoubleLeft(Text1.Text,1)=xLeft(...
Private Sub Label1_Click()
Dim x As Double
Dim y As Double
Dim z As Double
Left(Text1.Text, 1) = x
Left(str(Text1.Text), 2) = y
Left(str(Text1.Text), 3) = z
Label1.Caption = val("z""y""x")
End Sub
Private Sub Text1_Change()
Dim Text1 As String
End Sub 展开
Dim x As Double
Dim y As Double
Dim z As Double
Left(Text1.Text, 1) = x
Left(str(Text1.Text), 2) = y
Left(str(Text1.Text), 3) = z
Label1.Caption = val("z""y""x")
End Sub
Private Sub Text1_Change()
Dim Text1 As String
End Sub 展开
1个回答
展开全部
Private Sub Form_Load()
Dim x As Integer, s As String, d As String
Randomize
x = Int(9000 * Rnd + 1000)
s = CStr(x)
d = Right(s, 1) + Mid(s, 3, 1) + Mid(s, 2, 1) + Left(s, 1)
Show
Print "产生的数:"; x, "倒数:"; d
End Sub
Dim x As Integer, s As String, d As String
Randomize
x = Int(9000 * Rnd + 1000)
s = CStr(x)
d = Right(s, 1) + Mid(s, 3, 1) + Mid(s, 2, 1) + Left(s, 1)
Show
Print "产生的数:"; x, "倒数:"; d
End Sub
追问
那请问要TEXT1里输入数字,要怎么写?我关键是搞不清怎么把TEXT1里的东西写进函数里。。
追答
dim x as integer
x=val(text1)
一样
text1=d
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询