【正文】
Next iPrint Fib(12)End sub Sub Command1_Click()Dim A(1 To 5) As IntegerDim x As IntegerFor I = 1 To 5A(I) = INext II = 1 Do While x 6A(I) = A(I) + xx = x + 2I = I + 2Loop = A(1) = A(3)End Sub寫出程序運(yùn)行時(shí)單擊Command1按紐,文本框Text1和Text2上的輸出結(jié)果是______知識(shí)點(diǎn)補(bǔ)充:動(dòng)態(tài)數(shù)組:變體型變量可以作為動(dòng)態(tài)數(shù)組來使用,其賦值方式是用Array(值1,值2,值3,...值N)函數(shù)賦值,該數(shù)組大小由Array函數(shù)中值的個(gè)數(shù)來決定,如:DIM aA=array(21,12,23,44,65)則該變體型變量A將作為一維數(shù)組,下標(biāo)默認(rèn)從0開始,即為0 TO 5,其中包含5個(gè)數(shù)組元素,分別是A(0),A(1),A(2),A(3),A(4)2下列程序運(yùn)行后的結(jié)果是 ?。?)Option Base 1Dim a A=array( 2, 8, 5, 3, 10, 9, 13, 15, 14, 7)Count = 0For i = 2 To 9 If a(i) a(i 1) And a(i) a(i + 1) Then s = s + a(i) :Count = Count + 1 End IfNext iPrint s, Count(2)Option Base 1Private Sub Cmd1_Click()DIM aA=array(1,-2,3,-4,0,-6,7,-8,0,-10)FOR k=1 TO 10 Select Case SGN(a(k)) Case 1 S=S+a(k) Case 0 S=S+1 Case –1 S=S-a (k) End SelectNEXT kPrint “S=” , S28. 設(shè)有如下程序:private sub form_click( ) dim a a=array(1,2,3,4,5,6,7,8,9) for i=0 to 3 print a(5i); next iend sub程序運(yùn)行后的輸出結(jié)果是 。29. 以下程序運(yùn)行后,單擊窗體輸出的結(jié)果是___________Option Base 1Private Sub Form_Click()Dim aa=Array(19,17,15,13,11,9,7,5,3,11)For i=1 To 10If a(i)/3=a(i)\3 Or a(i)/5=a(i)\5 ThenSum=Sum+a(i)End IfNext iPrint SumEnd Sub以下程序運(yùn)行結(jié)果是 Dim a As Variant,b As Variant,c(1,3) As integera=Array(3,25,6,34) b=Array(23,56,32,12)For j=0 to 3C(0,j)=a(j) :C(1,j)=b(j)Next jm = c(1,1)for i=0 to 1 for j=0 to 3 if mc(i,j) then m= c(i,j) next j, iprint m1. 若不給自己設(shè)限,則人生中就沒有限制你發(fā)揮的藩籬。2. 若不是心寬似海,哪有人生風(fēng)平浪靜。在紛雜的塵世里,為自己留下一片純靜的心靈空間,不管是潮起潮落,也不管是陰晴圓缺,你都可以免去浮躁,義無反顧,勇往直前,輕松自如地走好人生路上的每一步3. 花一些時(shí)間,總會(huì)看清一些事。用一些事情,總會(huì)看清一些人。有時(shí)候覺得自己像個(gè)神經(jīng)病。既糾結(jié)了自己,又打擾了別人。努力過后,才知道許多事情,堅(jiān)持堅(jiān)持,就過來了。4. 歲月是無情的,假如你丟給它的是一片空白,它還給你的也是一片空白。歲月是有情的,假如你奉獻(xiàn)給她的是一些色彩,它奉獻(xiàn)給你的也是一些色彩。你必須努力,當(dāng)有一天驀然回首時(shí),你的回憶里才會(huì)多一些色彩斑斕,少一些蒼白無力。只有你自己才能把歲月描畫成一幅難以忘懷的人生畫卷。13