Tuesday, April 4, 2017

Square Root Solver in Visual Basic NET

Hi there in this article I would like to share with you a sample program that will ask the user to give a number in integer value and then our program will convert the square root equivalent of the given number by our user. The code is very easy to understand written in Visual Basic NET. I am using Visual Studio 2013 as my programming tool in this sample program. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.







Sample Program Output


Program Listing


Public Class Form1

    Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click

    End Sub

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        End
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim a, sqr_convert As Integer

        a = Val(TextBox1.Text)
        sqr_convert = Math.Sqrt(a)
        Label3.Text = "The square root equivalent of " & a & " is " & sqr_convert & "."
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        TextBox1.Text = ""
        Label3.Text = ""
        TextBox1.Focus()
    End Sub
End Class



No comments:

Post a Comment