The document contains code for a form with text boxes and buttons that perform basic math operations like addition, subtraction, multiplication, division, and modulus on the values in two text boxes and display the result in a third text box.
The document contains code for a form with text boxes and buttons that perform basic math operations like addition, subtraction, multiplication, division, and modulus on the values in two text boxes and display the result in a third text box.
The document contains code for a form with text boxes and buttons that perform basic math operations like addition, subtraction, multiplication, division, and modulus on the values in two text boxes and display the result in a third text box.
The document contains code for a form with text boxes and buttons that perform basic math operations like addition, subtraction, multiplication, division, and modulus on the values in two text boxes and display the result in a third text box.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click Dim cek = Val(TextBox1.Text) + Val(TextBox2.Text) TextBox3.Text = FormatNumber(cek, 0) End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button5.Click Dim cek = Val(TextBox1.Text) - Val(TextBox2.Text) TextBox3.Text = FormatNumber(cek, 0) End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click Dim cek = Val(TextBox1.Text) * Val(TextBox2.Text) TextBox3.Text = FormatNumber(cek, 0) End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button6.Click Dim cek = Val(TextBox1.Text) Mod Val(TextBox2.Text) TextBox3.Text = FormatNumber(cek, 0) End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim cek = Val(TextBox1.Text) / Val(TextBox2.Text) TextBox3.Text = FormatNumber(cek, 0) End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button7.Click Dim cek = Val(TextBox1.Text) TextBox3.Text = FormatNumber(Math.Sqrt(cek), 0) End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button8.Click Dim cek = Val(TextBox1.Text) / Val(TextBox2.Text) TextBox3.Text = FormatNumber(cek) End Sub End Class