Reversing number

Program in C for reversing number :

ALGORITHM:

    1. SET reverse=0
    2. Input the number.
    3. while(n!=0)
      SET reverse=reverse*10
      SET reverse=reverse+n%10
      SET n=n/10
      [end of loop]
    4. PRINT reverse

C SOURCE CODE :

Leave a Reply

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