ProAnswers.org

C program to reverse a number

int main()
{
int a;
printf(“Enter a number :”);
scanf("%d",&a);
int y=0;
while(a)
{
y=y*10+a%10;
a=a/10;
}
printf("
reverse= %d",y);
getch();
return 0;
}