60. C Program To find the Reverse of A Given Number.
How does this program work?
- This Program is used to find the reverse of a given number.
Here is the code
#include <stdio.h>
int main(void)
{
int n,r=0;
printf("Enter a number\n");
scanf("%d",&n);
while(n!=0)
{
r=r*10;
r=r+n%10;
n=n/10;
}
printf("Reverse of the number=%d\n",r);
return 0;
}