Showing posts with label square root solver in vb6. Show all posts
Showing posts with label square root solver in vb6. Show all posts

Wednesday, March 8, 2017

Square Root Solver in Visual Basic 6

Hi here is a sample program that will ask the user to give a number in integer and then our program will solve for it's square root equivalent of the given number by the user. The code is very short and easy to understand for beginners that are very new in Visual Basic 6 programming. 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


Function Square_Root_Solver(b As Integer)
Dim num As Integer
num = b
num = num ^ (1 / 2)
Label2.Caption = "The square root value of " & b & _
" is " & num & "."
End Function


Private Sub Command1_Click()
Dim a As Integer

a = Val(Text1.Text)

Call Square_Root_Solver(a)

End Sub

Private Sub Command2_Click()
Label2.Caption = ""
Text1.Text = ""
Text1.SetFocus
End Sub