...将其中的大写字母变为小写字母,小写字母变为大写字母,打印剩余的字 ...

发布网友 发布时间:2024-10-24 08:19

我来回答

4个回答

热心网友 时间:2024-10-30 18:57

Private Sub Command1_Click()
Dim oldstr As String, newstr As String, temp As String * 1, i
oldstr = InputBox("输入一行字符,回车结束!")
For i = 1 To Len(oldstr)
temp = Mid(oldstr, i, 1)
If UCase(temp) <> temp Then
temp = UCase(temp)
Else
temp = LCase(temp)
End If
newstr = newstr & temp
Next

Print oldstr
Print newstr
End Sub

热心网友 时间:2024-10-30 19:00

Private Sub Form_Click()
Dim AAA As String
AAA=Inputbox("输入一串字符")
AAA=LCase(AAA)
End Sub

热心网友 时间:2024-10-30 19:05

Dim t As String, t1 As String
Dim i As Integer
t = Text1.Text
For i = 1 To Len(t)
t1 = Mid(t, i, 1)
If t1 >= "A" And t1 <= "Z" Then
Print LCase(t1);
ElseIf t1 >= "a" And t1 <= "z" Then
Print UCase(t1);
Else
Print t1;
End If
Next i

热心网友 时间:2024-10-30 19:00

vb~~~

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com