#include<stdio.h> 

int main()
{

int n,sum,digit;

printf("Enter a Number:\n");
scanf("%d",&n);

do{ digit = n%10 ;
    sum = (sum*10)+digit;
    n=n/10;
    }

while(n!=0);
printf("The Reverse of the given no = %d",sum);

return 0;
}
     
           
Note: Need to be arranged in compiler after copied
   

 OutPut:

Enter a Number: 123 The Reverse of the given no = 321