Private Sub Command1_Click()
'鸡兔同笼问题
Dim Cock As Integer
Dim Rab As Integer
For Cock = 0 To 100
Rab = 100 - Cock
If Cock * 2 + Rab * 4 = 300 Then
Print "其中鸡有" & Cock & "只,兔子有" & Rab & "只"
End If
Next
End Sub