语句段
s=0
for i=1 to 5
s=s+i
next i
g=10
d=100
x=100
y=100
While d>1
Graphicswindow.drawellipse(x, y, d, d)
d=d-2*g
x=x+g
y=y+g
Endwhile
第一个圆的坐标和直径(100,100,100,100)
第二个圆的坐标和直径(110,110,80,80)
第三个圆的坐标和直径(,,,)
……
最后一个圆的坐标和直径(,,,)
计算Y坐标变化的语句是:
画圆的语句为:
计算直径变化的语句为:
判断循环结束与否的语句是:
for<循环变量>in< >:
<语句块>
空白处应该填写( )
s=0
For i=1 To 3
s=s+i
Next i
x=1
Do While x<28
X = x * 4
Loop
Print x
程序运行后,输出结果是( )
For i=1 to 5
s=s+1
next i
VB中,For循环语句的格式如下:
For循环变量= 初值 To 终值 Step 步长值语句组 Next |
s=0
for i in range(101):
If :
s=s+i
print (s)
……
Next x
B . for x=3 to -3 step -3……
next x
C . for x=1 to 10Re
Next x
If I=10 then go to re
D . for x= 3 to step 3……
Next y
for i in range(1,4):
print(i)
1
2
3
B . 12
3
C . 12
3
4
D . 1 2 3 4
下列选择正确的是( )