" />编写如下程序: Private Sub Command1_Click() Dim x As String, y As String x = Right("abcd", 2) y = Mid("dcba", 2, 3) If x >

编写如下程序: Private Sub Command1_Click() Dim x As String, y As String x = Right("abcd", 2) y = Mid("dcba", 2, 3) If x >

admin2020-07-22  45

问题 编写如下程序:
Private Sub Command1_Click()
   Dim x As String, y As String
   x = Right("abcd", 2)
   y = Mid("dcba", 2, 3)
   If x > y Then
      Print x + y
   Else
      Print y + x
   End If
End Sub
程序运行后,单击命令按钮Command1,输出结果为

选项 A、cdcba
B、cbacd
C、cbacd
D、cbcd

答案A

解析 Right("abcd", 2)从字串的右边截取2个字符"cd", Mid("dcba", 2, 3)从第二个字符开始截取3个字符"cba"然后判断x和y的大小。选A)。
转载请注明原文地址:https://kaotiyun.com/show/tjHp777K
0

最新回复(0)