vb的农夫过河代码,急急急急!!!!!!!!!!!!!

如果有现成的麻烦发去我qq。448226234
感激不尽!!!!!!!!!!!!!!!!!!

第1个回答  2011-06-22
Private Sub Command1_Click()
Dim strallthings(1 To 3) As String
strallthings(1) = "LY"
strallthings(2) = "LB"
strallthings(3) = "YB"
For i = 1 To 3
If Comparison(strallthings(i)) = True Then
Select Case strallthings(i)
Case "LY"
Print "第一次带走白菜,第二次带走羊或者狼"
Case "LB"
Print "第一次带走羊,第二次带走狼或者白菜"
Case "YB"
Print "第一次带走狼,第二次带走羊或者白菜"
End Select
End If
Next i
End Sub

Private Function Comparison(strget As String) As Boolean
Select Case strget
Case "LY"
Comparison = False
Case "LB"
Comparison = True
Case "YB"
Comparison = False
End Select
End Function

vb的农夫过河代码,急急急急!!!
Private Sub Command1_Click()Dim strallthings(1 To 3) As String strallthings(1) = "LY"strallthings(2) = "LB"strallthings(3) = "YB"For i = 1 To 3 If Comparison(strallthings(i)) = True Then Select Case strallthings(i)Case "LY"Print "第一次带走白菜,第二次带走羊...

相似回答