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)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…