设n=10,i=4,则赋值运算n%=i+1执行后,n的值是( )。A.0B.3C.2D.1
设n=10,i=4,则赋值运算n%=i+1执行后,n的值是( )。
A.0
B.3
C.2
D.1
相关考题:
若有数组Dim a%(10)且每个元素有值,统计前一个元素大于后一个元素的次数,结果存放在变量n中。 则下列语句正确的是___________。A.Dim i%, n% For i = 1 To 10 If a(i) > a(i + 1) Then n = n + 1 End If Next MsgBox(n)B.Dim i%, n% For i = 1 To 10 If a(i) > a(i + 1) Then n = a(i) End If Next MsgBox(n)C.Dim i%, n% For i = 0 To 9 If a(i) > a(i + 1) Then a(i) = n + 1 End If Next MsgBox(n)D.Dim i%, n% For i = 0 To 9 If a(i) > a(i + 1) Then n = n +1 End If Next MsgBox(n)
执行下列的程序段后,结果为______。 i = 0 n = 0 Do While i < 32 i = (i + 1) * (i + 1) n = n + 1 Loop Print nA.29B.4C.3D.0
5、设n=10,i=4、则赋值运算n%=i+1执行后,n的值是A.0B.3C.2D.1