Friday, 26 August 2011

Reverse Number logic


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

Parsing JSON w/ @ symbol in it

To read the json response like bellow @ concatenated with attribute                             '{ "@id": 1001, "@name&q...