题型:单选题 题类:常考题 难易度:普通
高中信息技术综合库——循环语句1
S=0
For i=1 To 14
x=2*i-1
If x Mod 3 =0 Then s=s+1
Next i
a=[i for i in range(1,7)] b=[0]*6 head, tail=0,0 for i in range(1,7): cnt=1 while cnt<i: a[tail]=a[head] head=(head+1)%6 tail=(tail+1)%6 cnt+=1 b[a[head]- 1]=i head=(head+1)%6 |
执行该程序段后, b[5]的值为( )
试题篮