I need to write a program that has:
INPUT: of one or more pairs of integers; the first integer is positive and between 0 & 999999999. The second integer is a value between 1 & 9. The "cin" method must be used to get the input values. The program must also accept an arbitrary number of input values.
OUTPUT: The output must contain the following:
For each input pair;
1) the input values
2) the number of digits comprising the first input value
3) the "n"th digit of the value, where "n" is the second number of the pair
After all the input pairs have been processed,
1) the sum of all the values from #2 above.
Can any of you come up with a program that can do this? I am stumped on this.