1.
(2016·杭州模拟)
如图是一个加密小程序,在①处输入一个3位数的密钥,在②处输出加密后结果。加密原理是密钥数字反向排列得到加密结果,如327加密后为723,下列程序段正确的是( )
A . Private Sub Command1Click()Dim p As StringLabel3.Caption = Mid(p, 3, 1) + Mid(p, 2, 1) + Mid(p, 1, 1)End Sub
B . Private Sub Command1Click()Dim p As Stringp = Text1.TextLabel3.Caption = Mid(p, 1, 1) + Mid(p, 2, 1) + Mid(p, 3, 1)End Sub
C . Private Sub Command1Click()Dim p As IntegerDim x(1 To 3) As Integerp = Val(Text1.Text)x1 = p Mod 10X2 = p \ 10 Mod 10X3 = p \ 100Label3.Caption = Str(x1) + Str(X2) + Str(X3)End Sub
D . Private Sub Command1Click()Dim p As IntegerDim x(1 To 3) As Integerp = Val(Text1.Text)x1 = p Mod 10X2 = p \ 10 Mod 10X3 = p \ 100Label3.Caption = Str(x3) + Str(X2) + Str(X1)End Sub