[求助]盗窃犯问题?
盗窃犯问题:张某被盗,公安局派出5个侦察员去调查.研究案情时,第一个侦察员说"A与B至少有一人是盗窃犯";第二个侦察员说"B与C至少有一人是盗窃犯";第三个侦察员说"C与D至少有一人是盗窃犯";第四个侦察员说"A与C中至少有一人不是盗窃犯";第五个侦察员说"B与D至少有一人不是盗窃犯".如果这些侦察员的话都是可靠的,编程求谁是真正的盗窃犯.程序如下:Private Sub Command1_Click()
Dim a As Integer, b As Integer, c As Integer, d As Integer
Dim c1 As Integer, c2 As Integer, c3 As Integer, c4 As Integer, c5 As Integer
For a = 0 To 1
For b = 0 To 1
For c = 0 To 1
For d = 0 To 1
c1 = a Or b
c2 = b Or c
c3 = c Or d
c4 = Not a Or Not c
c5 = Not b Or Not d
If (c1 And c2 And c3 And c4 And c5) Then
If (a = 1) Then
Text1.Text = "是"
Else
Text1.Text = "否"
If (b = 1) Then
Text2.Text = "是"
Else
Text2.Text = "否"
If (c = 1) Then
Text3.Text = "是"
Else
Text3.Text = "否"
If (d = 1) Then
Text4.Text = "是"
Else
Text4.Text = "否"
End If
End If
Next d
Next c
Next b
Next a
End Sub
但是运行程序的时候,出现"编译错误:next 没有 for"的提示,这是为什么?