Code Snippet posted by:
Anwarbesa@Yahoo.Com | Posted on: 5/4/2012 | Category:
C# Codes | Views: 665 | Status:
[Member] |
Points: 40
|
Alert Moderator
Hi.. you will make new windows form application and put one label named (Enter The Number) and put text box for it.. another label named(The Reverse Number) and put text box for it.. and put a button named(Reverse)..
Now,double click on the button and write this code:
int Number = Convert.ToInt32(textBox1.Text);
int r,x = 0;
while(Number>0)
{
r = Number%10;
Number = Number/10;
x = r+x*10;
}
textBox2.Text = x.ToString();
MessageBox.Show("Reverse Done Successfully");
I wish this is be helpful
Thanks and regards
Anwar
C is a sea.. and you are the sea of C!
Thanks & Regards