Encryption basic exercise

Hi another exercise which im having problems with. In this challenge im given a four digit integer and encrypt each digit as follows. Replace each digit by the sum of that digit plus seven mod 10. Then swap 1st and 3rd digit places and 2nd with 4th. Heres what i got so far. I havent figured out yet how to swap them. Any thoughts on that ? No arrays allowed.

My critique would be the following. The code is difficult to read, at least to me. iCounter, iNumber, iRemOfOriginal, etc., these are all variable names that are not obvious to me so it's hard for me to follow the logic.

The task seems fairly straightforward.

Isolate the digits.

Manipulate the digits.

Swap the digits.

Hence a digits[] array seems in order. Isolate them first before you do anything.

Now do any manipulation or swapping with the digits[] array. I imagine all of your code does that, but you seem to have more variables than necessary and I can't match the variable name to the variable's purpose.

Hi, i appreciate the response , but arrays are not allowed to do any manipulations. I thought my variables was meaningful as iNumber stood for the number given to be encrypted and jCounter is how many times i had to go through the cycle, i should have made more comments to explain what takes place where.

True, vectors are off the table. Anyhow , my code works and produces correct results. However, i over analyzed the exercise. This is what author expected readers to do. To swap the numbers he just wanted us to create 4 variables and use % and / and then just swap the numbers and put it back together. Thanks for the help. I wrote to the author and that was his response.