下列程序段的执行结果为()。x = 6For k = 1 To 10 Step -2 x = x + kNext kPrint k; x
举一反三
- 下列程序段执行结果为( )。 x=5 y=-6 If Not x>0 Then x=y-3 Else y=x+3 Print x-y;y-x A: k/1l B: k%11 C: k/11==0 D: k%11==0
- X的初始值是3,执行下面的程序段For I = 1 To 10 Step -2: x = x + I 3: Next I后,X的值为
- 有下面的程序段if k<=10 and k >0:if k >5:if k>8:x=0else:x=1else:if k>2:x=3else:x=4其中k取哪组值时x =3?
- 下列程序段中没有错误的是______。 A: x=6For k=5 To 1 Step-1x=x+1NextPrint x B: x=10While x>5x=x-1LoopPrint x C: x=10Do While x>5x=x-1End DoPrint x D: X=6Do While x>5x=x+1Loop Until x=10Print x
- 执行下列程序段后,x的值为( )。x = 10For i = 1 To 5 For j = 1 To 5 Step 2 x = x - 1 Next jNext i A: -5 B: 5 C: 10 D: 0