Home > Back-end >  Given a 32-bit signed integer, you will need this integer in each of the Numbers on the reverse
Given a 32-bit signed integer, you will need this integer in each of the Numbers on the reverse

Time:04-09

#include
#include
Int main ()
{
Int N, temp, result=0;
The scanf (" % d ", & amp; N);
Temp=abs (N);
While (temp % 10==0 & amp; & temp !=0)
Temp/=10;

Do {
Result=result * 10 + temp % 10;
Temp/=10;
} while (temp!=0);

If (N & lt; 0)
Result *=1;
Printf (" % d \ n ", result);

CodePudding user response:

What's the problem?

CodePudding user response:

Beginners don't quite understand, the hope can a little comment, thank you

CodePudding user response:

Abs absolute value functions;

 while (temp % 10==0 & amp; & temp !=0) 
Temp/=10;

For 1000100, 500 and so on these data,

But such a program, 1000 how to flip, flip was $0001, or 1?

  • Related