Reversing number using recursion

Program for reversing number using recursion :

ALGORITHM:

    1. SET rev =0
    2. REVERSE(long n)
      if (n == 0)
      return 0;
      else
      SET rev = rev * 10
      SET rev = rev + n % 10
      REVERSE(n/10)
      return z

C SOURCE CODE :

Leave a Reply

Your email address will not be published. Required fields are marked *