谁会字母的逆序排序呀,急急急(在线等待)

er130 2003-05-15 08:54:27
text1中有asdf,点按纽后,text2中显示fdsa怎么写程序呀!!~~
...全文
48 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
qingming81 2003-05-16
  • 打赏
  • 举报
回复
这只是倒转字符串,不是逆序排序。用chenlishu413(超级学生)的。
loulun 2003-05-16
  • 打赏
  • 举报
回复
Private Sub command1_click()

Dim tempstr As String
Dim str As String
If Text1.Text = "" Then
MsgBox ("pleale input a string in the text")
End If
str = Text1.Text
tempstr = StrReverse(str)
Text2.Text = tempstr
End Sub
chenlishu413 2003-05-15
  • 打赏
  • 举报
回复
Dim tempstr As String
Dim str As String
str = InputBox("please input a string")
tempstr = StrReverse(str)
Print tempstr
chenlishu413 2003-05-15
  • 打赏
  • 举报
回复
Dim tempstr As String
Dim str As String
Dim max As Long
Dim i As Long

str = InputBox("please input a string")
max = Len(Trim(str))

For i = max To 1 Step -1
tempstr = tempstr + Mid$(str, i, 1)
Next

Print tempstr
Reker熊 2003-05-15
  • 打赏
  • 举报
回复
a=Len(text1.text)
For I=0 to a-1
tempStr=tempStr+Mid(text1.text,a-I,1)
Next
text2.text=tempStr
99998888ccddcc 2003-05-15
  • 打赏
  • 举报
回复
Private Sub Form_DblClick()
Dim x As Integer, a(1 To 4) As String
a(1) = "r": a(2) = "o": a(3) = "s": a(4) = "e"
For x = 1 To 4
Label1.Caption = Label1.Caption + a(x)
Next x
For x = 4 To 1 Step -1
Label2.Caption = Label2.Caption + a(x)
Next x



End Sub

ROBOT 2003-05-15
  • 打赏
  • 举报
回复
dim i as integer
dim strtemp as string
for i=1 to len(text1.text)
strTEmp=strtemp & mid(text1.text,len(text1.text)-i+1,1)
next

text1.text=strTemp

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧