21世纪教育网
设计作品3060183
B. pascal语言
C. vb语言
D. 自然语言 下列VB程序段的功能为:生成n个不重复的随机整数,保存在数组a中,并升序排序。 Const n = 6 Dim a(i To n) As Integer,f(1 To 10) As Boolean Dim tmp As Integer,i As Integer,j As Integer,t As Integer ’f数组各元素的初值置为False,代码略 For i=1 To t = Int(1+Rnd*10) If Not f(t) Then a(i)=t︰f(t)= True For j= If a(j)< a(j-1) Then tmp = a(j)︰a(j)= a(j-1)︰a(j-1)= tmp End If Next j Else End If Next i 上述程序段3个方框处的表达式分别为 A. (1) n-1 (2) 2 to i (3) i = i-1 B. (1) n (2) i to 2 Step-1 (3) i= i-1 C. (1) n-1 (2
转载请注明出处!本文地址:https://www.docer.com/preview/21444556
关注稻壳领福利
举报