Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim x As Integer, y As Integer, z As Integer
        Dim str1 As String
        str1 = ""
        For x = 0 To 100        ' 可优化为For x = 0 To 19
            For y = 0 To 100    ' 可优化为For y = 0 To 33
                z = 100 - x - y
                If 5 * x + 3 * y + z / 3 = 100 Then
                    str1 = str1 & "公鸡：" & x & "母鸡：" & y & "小鸡：" & z & vbCrLf
                End If
            Next y
        Next x
        Label1.Text = str1
    End Sub
End Class
