Saturday, September 28, 2019

Palindrome Number Using Visual Basic 6

In this article I would like to share with you guys a sample program that will ask the user to give a number and then the program will check if the given number is a palindrome or not a palindrome using Microsoft Visual Basic 6. The code is very short and very easy to understand.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com
and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com.
 
 




Sample Program Output


Program Listing

Private Sub Command1_Click()
Dim num, rev, tem As Integer

num = Val(Text1.Text)
tem = num

While tem > 0
   rev = rev * 10
   rev = rev + (tem Mod 10)
   tem = tem \ 10
Wend

Text2.Text = rev

If num = rev Then
Text2.Text = "The number " & Str(Text1.Text) & " is Palindrome."
Else
Text2.Text = "The number " & Str(Text1.Text) & " is Not a Palindrome."

End If

End Sub

Private Sub Command2_Click()
Form1.Text1.Text = ""
Form1.Text2.Text = ""
Form1.Text1.SetFocus
End Sub

Private Sub Command3_Click()
End
End Sub

Private Sub Form_Load()
Form1.Show
End Sub
 


No comments:

Post a Comment