Private Sub Command1_Click()
Dim m, n
m = Val(InputBox(请输入总头数))
n = Val(InputBox(请输入种脚数))
Print "鸡", "兔"
For i = 1 To m
For j = 1 To m
If i * 2 + j * 4 = n And i + j = m Then Print i, j
Next j
Next i
End Sub
设鸡为X只,鸭Y只,则:X+Y=M,2X+4Y=N就可以求出了