how can I ascend the 6digit numbers, example:

453621

123456

using c++

TNX more power