Public Class Form1
    Dim a, b As Integer
    Dim c As Double

    Private Sub Button_Cong_Click(sender As Object, e As EventArgs) Handles Button_Cong.Click
        a = InputBox("a= ")
        b = InputBox("b= ")
        c = a + b
        MsgBox("Tong la:" & c)
    End Sub
    Private Sub Button_Tru_Click(sender As Object, e As EventArgs) Handles Button_Tru.Click
        a = InputBox("a= ")
        b = InputBox("b= ")
        c = a - b
        MsgBox("Tru la:" & c)
    End Sub
    Private Sub Button_Nhan_Click(sender As Object, e As EventArgs) Handles Button_Nhan.Click
        a = InputBox("a= ")
        b = InputBox("b= ")
        c = a * b
        MsgBox("Nhan la:" & c)
    End Sub
    Private Sub Button_Chia_Click(sender As Object, e As EventArgs) Handles Button_Chia.Click
        a = InputBox("a= ")
        b = InputBox("b= ")
        If b = 0 Then
            MsgBox("error ")
        Else
            c = a / b
            MsgBox("Chia la: " & c)
        End If
    End Sub
End Class


