... the number as follows: Every digit of n is replaced by the remainder of this digit when divided by k. Then add to the resulting new digit 1 if it is the ones digit, 2 if it is the tens digit, 3 if it is the hundreds digit and so forth. Your program should then display the resulting number.

For example, if the user enter 47921 as n and 3 as the key, then the new integer is formed of the following digits:
(1 % 3) + 1  2
(2 % 3) + 2  4
(9 % 3) + 3  3
(7 % 3) + 4  5
(4 % 3) + 5  6

Sample Run 1:
Enter a 5 digit number: 47921
Enter a key: 3
The resulting number is: 65342

Sample Run 2:
Enter a 5 digit number: 86432
Enter a key: 5
The resulting number is: 85753