How can I go about padding an array of a certain size so that it will align with another one?
For example I have an addition problem I am working out and cannot find the solution to.
When my program prints it out it will look like this:
1234567 should be ----> 1234567
1234 should be ----> 0001234
2468342 should be ----> 1235801
The firs numbers add correctly and then afterwards they are junk numbers. How could I pad the second array which contains the 1234 to shift to the right. I believe it may have something to do with the #include<iomanip> library. Also the size of the arrays are not static they are chosen by the user at the beginning of the program, so the I think the padding will have to be dynamic.
I don't want the code but any suggestions or nudges in the right direction would be helpful.