#include<stdio.h>
#include<conio.h>
void main()
{
long rev = 0, rem , n;
clrscr();
printf("\n Enter the number ");
scanf("%ld",&n);
while(n>0)
{
rem=n%10;
n=n/10;
rev=rev*10 +rem;
}
printf("\n The reverse number = %ld",rev);
}
No comments:
Post a Comment