cls
dim i as integer,m as integer,n as integer,k as integer
m=int(inpurbox(“输入一个整数”“m=”1234)
print “原数=”m
n=0
do while(m>0)
k=m mod 10
m=m\10
n=n*10+k
loop
print “逆序数=”n
end sub
'添加两个文本框Text1和Text2,一个按钮Command1'Text1输入文字,单击按钮Command1时Text2输出文字
Private Sub Command1_Click()
Dim str1 As String
Dim str2 As String
Dim i As Integer
str1 = Text1
For i = Len(str1) To 1 Step -1
str2 = str2 & Mid(str1, i, 1)
Next
Text2 = str2
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)