U
usgog
I need some help to do number conversion...:
I got a 9 digit integer from another function (say int A = 123456789)
and need to make a 4 digit one (int B, say 6789) from A. Then I send B
to user.
User types in 4 digit integer (int C) and I check whether B == C. If
true, then I convert B to back to A again.
So how can I convert A to B and then B to A? Any algorithm I can use,
say get the last four digit of A?
I got a 9 digit integer from another function (say int A = 123456789)
and need to make a 4 digit one (int B, say 6789) from A. Then I send B
to user.
User types in 4 digit integer (int C) and I check whether B == C. If
true, then I convert B to back to A again.
So how can I convert A to B and then B to A? Any algorithm I can use,
say get the last four digit of A?