#include<stdio.h>
int main()
{
int a,b,c,x,m,rev;
printf("Enter three digit numbers\n");
scanf("%d",&x);
m=x;
a=x%10;
x=x/10;
b=x%10;
x=x/10;
c=x%10;
x=x/10;
rev=a*100+b*10+c;
printf("Reverse of digit %d is=%d",m,rev);
}
OUTPUT
Enter three digit numbers
678
Reverse of digit 678is=876
Comments
Post a Comment