1.
(2020高二下·浙江期末)
小李同学基于选择排序算法编写了如下程序,Text1中输入一个全部为数字的字符串,现重新排列该字符串各个位置上的数字,使其可以组成的数最小(若零在开头,则省略不写)。
m = Text1.Text: n = Len(m)
For i = 1 To n - 1
k = i
For j = i + 1 To n
If Then k = j
Next j
If i <> k Then
m = Mid(m, 1, i - 1) + Mid(m, k, 1) + + Mid(m, i, 1) +
End If
Next i
Text2.Text = Val(m)
上述程序中划线处应填入的语句为( )
A . Mid(m, j, 1) > Mid(m, k, 1);Mid(m, i + 1, k - i - 1);Mid(m, k + 1)
B . Mid(m, k, 1) > Mid(m, j, 1);Mid(m, i + 1, k - i + 1);Mid(m, k + 1)
C . Mid(m, j, 1) < Mid(m, k, 1);Mid(m, i + 1, k - i - 1);Mid(m, k + 1)
D . Mid(m, j, 1) < Mid(m, k, 1);Mid(m, i + 1, k - i + 1);Mid(m, k + 1, n - k)