#include<stdio.h>
int main()
{
int num,revnum=0,rem;
printf("\n Enter a number= ");
scanf("%d",&num);
while(num!=0)
{
rem=num%10;
revnum=revnum*10+rem;
num=num/10;
}
printf("\n The reverse number=%d", revnum);
return 0;
}
int main()
{
int num,revnum=0,rem;
printf("\n Enter a number= ");
scanf("%d",&num);
while(num!=0)
{
rem=num%10;
revnum=revnum*10+rem;
num=num/10;
}
printf("\n The reverse number=%d", revnum);
return 0;
}
0 Comments