Dim x%, y%, z% 'x,y,z分别是买公鸡,母鸡,小鸡的数量
Private Sub Form_Click()
For x = 0 To 20
For y = 0 To 33
For z = 0 To 300
If 5 * x + 3 * y + (1 / 3) * z = 100 Then
Print x, y, z
End If
Next z
Next y
Next x
End Sub
01月07日 编辑 39baobao.com
Dim x%, y%, z% 'x,y,z分别是买公鸡,母鸡,小鸡的数量
Private Sub Form_Click()
For x = 0 To 20
For y = 0 To 33
For z = 0 To 300
If 5 * x + 3 * y + (1 / 3) * z = 100 Then
Print x, y, z
End If
Next z
Next y
Next x
End Sub