I was writing up a program for calling up data from a file when I realized the way I "coded" it didn't have a way to call it back effectively. That probably makes no sense, even to me. However, simple put, I was curious if there was a way to change a single digit of an integer to what you want.
ie:
22 to 12 without subtracting ten, just changing the digit.
I was trying something with arrays, but it didn't work (and honestly I didn't expect it to.) I was running a test to see if you have an integer array but print it without defining which part of the array to print.
This is specifically what I tried, but it didn't work.
Bottom line: is there a way to change the digits in integers without having to do a mathematical calculation? Or would I have to write up a function to do it for me? Amd is that possible?