#include <stdio.h>
int main()
{
long int counter = 1234, temp, remainder, reverse;
temp = counter;
reverse = 0;
while (temp > 0){
remainder = temp % 10;
reverse = reverse * 10 + remainder;
temp /= 10;
}
printf("The reverse of %ld is %ld./n", counter, reverse);
return 0;
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266580.html