赞题库-背景图
单项选择题

下面程序运行后,语句“Print i”执行的次数是( )。 Private Sub Form_Click() Dim i As Integer,j As Integer i=0 Do i=i+1 Forj=10 To 1 Step-3 i=i+j Printi Next j Loop While i<50 End Sub

A.4
B.8
C.12
D.16
<上一题 目录 下一题>
热门试题

单项选择题有如下函数: Function fun(a As Integer,n As Integer) As Integer Dim m As Integer While a>=n a=a-n:m=m+l Wend fun=m End Function 该函数的返回值是( )。

A.a乘以n的乘积
B.a加n的和
C.a减n的差
D.a除以n的商(不含小数部分)

单项选择题下列程序运行后,单击窗体,在窗体上显示:1,1+2,1+2+3,1+2+3+4,1+2+3+4+5的和。在横线处应填写( )。 Private Sub Form_Click() Dim i As Integer,tt As Integer For i=1 To 5 tt=Sum(i):Print tt= ;tt, Next i End Sub Private Function Sum(________) __________ j=j+n:Sum=j End Function

A.n As Integer j As Integer
B.n As Integer Static j As Integer
C.ByVal n AS Integer j As Integer
D.ByVal n As Integer Static j As Integer