#include<stdio.h>
main()
{
int num,rev=0,rem;
printf("\nEnter a number=");
scanf("%d",&num);
while(num)
{
rem=num%10;
rev=rev*10+rem;
num/=10;
}
printf("\nThe reverse =%d",rev);
}
main()
{
int num,rev=0,rem;
printf("\nEnter a number=");
scanf("%d",&num);
while(num)
{
rem=num%10;
rev=rev*10+rem;
num/=10;
}
printf("\nThe reverse =%d",rev);
}
No comments:
Post a Comment