This is a simple question don't look for difficulties.
I have such a cycle
int arr[]{ 111, 222, 333 };
for (size_t i = 0; i < 3; i++) {
test = 1000 * test + arr[i];
}
std::cout << test;
it returns the result 111222333
the question is how to make it output the result 333222111
in short add numbers from the other side
you need to change this line to something else to add values in a different way
test = 1000 * test + arr[i];
I will update the question a little bit, that would be interesting, what if there is no array and you get the data in this form.
test = 1000 * test + X;
X
is an unknown number and not an array