=================================Slip
4_1================================
Write a VB Program to display the reverse of a given number using
function. (Accept number through textbox and display result using message box) =======================================================================
Option
Explicit
Private Sub
Command1_Click()
Dim n As Integer
n = Val(Text1.Text)
Dim a As Integer
Dim r As Integer
While n <> 0
a
= n Mod 10
r
= r * 10 + a
n
= n \ 10
Wend
MsgBox
("revers is" & r)
End Sub
No comments:
Post a Comment
Note: only a member of this blog may post a comment.