int given_no = 123, final_rev_no = 0, temp = 0,initialno;
initialno = given_no;
while (given_no > 0)
{
temp = given_no % 10;
final_rev_no = final_rev_no * 10 + temp;
given_no /= 10;
}
lblmessgae.Text = "Reverse of given number is " + final_rev_no;
Tag: Reverse Number, Reverse Number in asp.net, Reverse Number in c, Reverse Number in cpp, Reverse Number logic, Reverse Number program in c, Reverse Number program in c#, Reverse Number program in cpp
No comments:
Post a Comment