The program reads a positive 3 digits each time, and then outputs the digits in reverse order. Note: When the input number contains a trailing 0, the output should not have a leading 0. For example, if you enter 700, the output should be 7.
Input format:
Each test is a 3-digit positive integer.
Output format:
output the number in bit reverse order.
Input sample:
123
Sample output:
321
#include<stdio.h>
int main (void)
{
int a, b, c, d, e;
scanf("%d",&a);
b=a/100;
c=a/10%10*10;
d=a%10*100;
e=b+c+d;
printf("%d", e);
return 0;
}