VB中正确的循环语句是( )VB中正确的循环语句是( )1.For x=1 to step 102.For x=1 to 10 step 23.For x=1 to 10 step -14.For x=10 to 1其余的为什么不行啊!for x 我记得for next 的步长可以为负数的,next又是什么?

来源:学生作业帮助网 编辑:六六作业网 时间:2024/07/03 11:51:53
VB中正确的循环语句是()VB中正确的循环语句是()1.Forx=1tostep102.Forx=1to10step23.Forx=1to10step-14.Forx=10to1其余的为什么不行啊!f

VB中正确的循环语句是( )VB中正确的循环语句是( )1.For x=1 to step 102.For x=1 to 10 step 23.For x=1 to 10 step -14.For x=10 to 1其余的为什么不行啊!for x 我记得for next 的步长可以为负数的,next又是什么?
VB中正确的循环语句是( )
VB中正确的循环语句是( )
1.For x=1 to step 10
2.For x=1 to 10 step 2
3.For x=1 to 10 step -1
4.For x=10 to 1
其余的为什么不行啊!for x 我记得for next 的步长可以为负数的,next又是什么?

VB中正确的循环语句是( )VB中正确的循环语句是( )1.For x=1 to step 102.For x=1 to 10 step 23.For x=1 to 10 step -14.For x=10 to 1其余的为什么不行啊!for x 我记得for next 的步长可以为负数的,next又是什么?
for x(循环变量) =1( 初始值) to 10(终止值) step 2 (步进)
next
以上为完整的循环结构
1.没有终止值 所以错
3.初始值比终止值小 所以步进应该为整数 而它是负数 所以也错
4.初始值大于终止值 默认步进为1 无法循环 所以也错