Algorithm to calculare from 3-digit number any number in range 000000-999999 -


i need algorithm calculare 3-digit number number in range 000000-999999.

there must able calculare number reverse range in 000000-999999 3-digit number.

algorithm must universal combinations in specified ranges.

any ideas?

(it should formula, when filled single numbers 3-digit number output corresponding 6-digit number)

the direction 6-digit number 3-digit number can done collapsing multiple 6-digit values 3-digit range. simple technique take modulo of original number 1000, resulting in 0 999

int threedigit = sixdigit % 1000; 

transforming 3 digit number original 6 digit number theoretically impossible, no matter algorithm use map 6-digit number onto 3-digit numbers, because information lost in original conversion process.


Comments