Code 6: Technique to reverse a number.

Problem Description:
Reversing of a number can be done by using the Reversing Technique s=s*10+r where 's'  is the reversed number(initially 0)and r the extracted digit. Here we need to first extract the digits using digit extraction technique and then use the reversing technique to reverse it.

No comments:

Post a Comment