I am trying to reverse decimal numbers more efficient.
#include <stdio.h>
int main()
{
while(1)
{
int a,result;
scanf("%d",&a);
result=(a%10*10)+(a/10);
printf("%d
",result);
}
}
Of course this will only work with 2 decimal numbers.
But I am trying to find out how I can reverse more numbers in an efficient way ( less code)