logo - 刷刷题
下载APP
【简答题】

程序填空【一】 功能:要求在Text1中输入一段字符,选中“大写转为小写小写转为大写”,单击转换按钮后,Text2显示大小写相反的字符串;选中“全部小写”,单击转换按钮后,Text2显示全部小写的字符串;选中“全部大写”,单击转换按钮后,Text2显示全部大写的字符串。 Private Sub Command1_Click() Dim n As Integer, k As Integer, ch As String, a As String '**********SPACE********** n = Len(【?】) ch = "" For k = 1 To n '**********SPACE********** a = Mid(Text1.Text,【?】,1 ) If Option1.Value = True Then If a >= "a" And a <= "z" Then ch = ch + UCase(a) ElseIf a >= "A" And a <= "Z" Then ch = ch + LCase(a) Else ch = ch + a End If End If If Option2.Value = True Then ch = UCase(Text1) End If If Option3.Value = True Then ch = LCase(Text1) '**********SPACE********** 【?】 Text2 = ch Next k End Sub

举报
参考答案:
参考解析:
.
刷刷题刷刷变学霸
举一反三