How to get values one, two and three back?
Is the following approach correct? Looks like no.
int EncodedValue = one*100 + two*10 + three;
// the following decryption is part of another procedure
int one = EncodedValue / 100;
int two = EncodedValue / 10;
int three = EncodedValue % 10;
Assuming
twoandthreeare originally in the range 0-9 (otherwise you have ambiguity) you want:… otherwise it basically gets ten times the
onevalue added to it.