vb编程计算中 if 语句块的语法问题 运行时提示“endif缺少if语句块”
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/10/05 08:32:32
vb编程计算中 if 语句块的语法问题 运行时提示“endif缺少if语句块”
For j = 5 To a
If Cells(j,8) >= 0 Then
Cells(j,9) = Cells(j,8)
Else
For m = -1 To -j
If Cells(j + m,8) > 0 Then
b = Cells(j + m,8)
End If
Exit For
For n = 1 To a - j
If Cells(j + n,8) > 0 Then
c = Cells(j + n,8)
End If
Exit For
Cells(j,9) = (b + c) / 2
End If
Next j
For j = 5 To a
If Cells(j,8) >= 0 Then
Cells(j,9) = Cells(j,8)
Else
For m = -1 To -j
If Cells(j + m,8) > 0 Then
b = Cells(j + m,8)
End If
Exit For
For n = 1 To a - j
If Cells(j + n,8) > 0 Then
c = Cells(j + n,8)
End If
Exit For
Cells(j,9) = (b + c) / 2
End If
Next j
请给你的代码加上注释,保持好正确的缩进,以及:给你的for加上next 想要完美可以在next后面加上是结束 哪一个for.另外,exit for是退出循环的命令,不是确定for循环边界的命令.所以,你的错误在for没有足够的next
VB的一个IF循环语句语句问题
vb中比较3数的大小的编程,要用IF语句.
matlab子函数中if语句不能运行
VB试题 语句if 0
VB的if语句的问题Private Sub Command1_Click()If Text1 = "111" ThenF
if then语句的问题
matlab的if语句问题
vb if else 语法中,then后面如果有多条语句,需要用括号括起来么?
vb 用inputbox函数输入3个任意整数,安从大到小顺序输出 (块if语句)
vb题中利用if语句计算分段函数x>=20时y=x+3 10
在vfp中具有步长概念的的程序语句是? A、DO WHILE -ENDDO B、IF-endif C、FOR-ENDFO
vb+if语句+与vb+if函数一样吗