Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim H, F As Integer, x%, y%
        H = InputBox("请输入头的数量：")
        F = InputBox("请输入脚的数量：")
        x = (4 * H - F) / 2
        y = (F - 2 * H) / 2
        Label2.Text = "设笼中鸡和兔子的头的数量是" & H & "，脚的数量是" & F
        Label3.Text = "则笼中有鸡" & x & "只，兔子" & y & "只。"
    End Sub
End Class
