执行下列程序段后,整型变量n的值为()。n=0For i=1 To 20 Step 5n=n+1Next i
A.50
B.4
C.15
D.210
A.50
B.4
C.15
D.210
若整型变量a值为2、b的值为3,则下列程序段执行后整型变量c的值为______。 If a>5 then If b<4 Then c=a-b Else c=b-a Else If b>3 Then c=a*b Else c=a mod b End If
A. 2
B.-1
C.1
D.6
以下程序段执行后整型变量n的值为()。 n=0 For i=1 to 20 Step 5 n=n+1 Next i
A.50
B.4
C.15
D.210
若s、i均为整型变量,执行下列程序段后s的值为 ______。
s=0
i=1
Do
s=s+i
i=i+1
Loop Until i>5@答案@15@[评析]@本题考查了Do...Loop Until控制语句。每执行一次循环,变量s加一次变量i,随后变量i再加一次1,直到变量5大于5时终止循环。i的初始值为1,故Do循环执行5次。相应的,变量s分别加1、2、3、4、5,故答案为15。
若整型变量a的值为2、b的值为3,则下面程序段执行后整型变量c的值为()。 If a>5 Then If b<4 Thenc=a-b Elsec=b-a Else If b>3 Thenc=a*b Elsec=aMod6 End If
A.2
B.-1
C.1
D.6
执行以下程序段后,整型变量C的值为()。 a=24 b=328 Select Caseb\10 Case0 c=a*10+b Case 1 to 9 c=a*100+b Case 10 to 99 c=a*1000+b End Select
A.537
B.2427
C.24328
D.240328
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!