VB中:If x = n Then lable1.Caption = "你猜对了,共猜了"& n& "次"为什么总是提示缺少结束语呢?

来源:百度知道 编辑:UC知道 时间:2024/04/30 15:22:22
If x = n Then lable1.Caption = "你猜对了,共猜了"& n& "次"
ElseIf x < n Then lable1.aption = "你猜小了,再试一次吧!"
Else: lable1.Caption = "你猜小了,再试一次吧!"
End If

If x = n Then
lable1.Caption = "你猜对了,共猜了"& n& "次"
ElseIf x < n Then
lable1.aption = "你猜小了,再试一次吧!"
Else
lable1.Caption = "你猜小了,再试一次吧!"
End If

每个if 或elseif 都要有个end if 做结尾!!
编写时最好是养成缩进的写法,避免这类错误,别人读的时候也方便!

还差

end if