1.
(2019·上海模拟)
某VB程序功能:输入正整数n,单击命令按钮Command1后,则会衍生出一串有规律的数字,形式为“1 2 3…n-1 n n-1…3 2 1 ”。例如n=6时,显示的数字串为“1 2 3 4 5 6 5 4 3 2 1 ”。
Private Sub Command1_Click()
Dim a As intger, i As intger, s As String
n = Val(Text1.Text)
s = ""
For i = 1 To 2 * n - 1
If i > n Then ① Else ②
Next i
text2.Text = s
End Sub
为实现以上功能,①②处分别填写( )
A . ①s=Str(2*n-i) ②s=Str(i)
B . ①s=s+Str(2*n-i) ②s=s+Str(i)
C . ①s=s+Str(2*n-1) ②s=s+Str(2*n)
D . ①s= Str(2*n-1) ②s= Str(2*n)