其实我也不大会数学,我的主张也跟楼上斑竹一样,让电脑替我们考虑问题:
Private Sub Timer1_Timer()
For gj = 0 To 100
For mj = 0 To 100
For xj = 0 To 100
If gj * 5 + mj * 3 + xj / 3 = 100 And gj + mj + xj = 100 Then Print "公鸡:" & gj & " 母鸡:" _
& mj & " 小鸡:" & xj
Next xj
Next mj
Next gj
Timer1.Enabled = False
End Sub
运行结果:
公鸡:0 母鸡:25 小鸡:75
公鸡:4 母鸡:18 小鸡:78
公鸡:8 母鸡:11 小鸡:81
公鸡:12 母鸡:4 小鸡:84
[此贴子已经被作者于2007-6-18 22:43:25编辑过]