Showing posts with label visual basic.net absolute value. Show all posts
Showing posts with label visual basic.net absolute value. Show all posts

Friday, October 7, 2016

Absolute Value Solver in Visual Basic.NET

A simple program that I wrote using Microsoft Visual Basic.NET to solve the absolute value of the given negative integer number by the user. The code is very simple and easy to understand.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 


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 Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim value_a As Integer
        Dim solve_a As Integer

        value_a = Val(TextBox1.Text)

        solve_a = Math.Abs(value_a)

        Label3.Text = "The absolute value of " & value_a & " is " & solve_a & "."

    End Sub

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