Program to find reverse and check whether it is palindrome
Sample :
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
Label3.Caption = "The number is palindrom"
Else
Label3.Caption = "The number is not a palindrom"
End If
End Sub
Full Code :
Output(Reverse & Palindrome.exe)
Full code(Reverse & Palindrome.doc)
Full project(Reverse & Palindrome.zip)
*Note Full project require Visual Basic 6.0