【正文】
=3 : y = 77 Do While x Sqr ( y ) x = x + 2 Loop A、7 B、8 C、10 D、925.下面是用VB編寫的求1 + 1/2 + 1/3 +……+1/100和的程序,該程序循環(huán)終止時 i 的值是多少?( )Private Sub Form_Activate( )Dim i As Integer , sum As Integersum = 0For i = 1 To 100 sum = sum + 1/iNext iPrint “sum = “ 。A、語句定義了數(shù)組K,它的下標(biāo)是從0到11B、數(shù)組K共有12個分量C、數(shù)組K的各個分量都是長整型數(shù)D、數(shù)組K的各個分量的值將按從小到大的順序自動排列2下列是合法變量名的是:( )A、a3 B、7 C、a$ D、text72以下不屬于算法基本特征的是( )。 a = 5 b = 10 max = a IF b max Then max = b A、5 B、10 C、5和10 D、其他三項都不是3以下屬于程序的基本控制結(jié)構(gòu)的是( ) A、星形結(jié)構(gòu) B、選擇結(jié)構(gòu) C、網(wǎng)絡(luò)結(jié)構(gòu) D、平行結(jié)構(gòu) 二、程序分析題Private Sub Form_Activate( )Dim a, b, c As Integera = 15: b = 60: c = 38If a b Then m = aElse m = bEnd IfIf m c Then m = cEnd IfPrint M=。Private Sub Form_Activate( ) Dim i, s AS Integer s=0 For i=1 TO 100 s= s+i Next i Print “S=”。Private Sub Form_Activate( ) Dim i, s AS Integer s = 0 for i =1 to 99 Step 2 s = s+i Next i Print “S=”。SEnd Sub運(yùn)行結(jié)果:_____S=24_________ 計算1+1/2+……+1/50的值。s End Sub分析程序,寫出計算結(jié)果Private Sub Form_Activate() Dim I As Integer, S As Integer S = 0 For I = 2 To 6 S = S + I Next IPrint S=。 i,p 輸出:I,P 分別為:_6___,___16___10.Sum=0 For i=1 To 100 sum=sum+2 Next i print “Sum=”。 b=0 Do while a=5 b=b+a*a a=a+1 Loop Print a, b 屏幕上顯示的內(nèi)容是:__6__ ,__55__13.完善程序,打印如下圖形 *********************For I = 1 To 6For j = 1 To__i__ Print *。y=77DO WHILE xsqr(y) x=x+2LOOP15.p = 0: n = 5For I = 1 To n p = p + I * 2If p = 10 Then Exit For Next IPrint p