I need help with changing a 9 digit integer into a new 9 digit integer through simple mathematical operations. For example, I need to change 123456789 into the new digit 456123789. Sometimes I need to change a 9 digit integer into an 8 digit integer. An example is 789062456 into 62789456. If anyone can help me, I'd greatly appreciate it. I can ONLY use simple mathematical operations (addition, subtraction, multiplication, division and modulo). Thanks!
Let me clarify. This is what the specifications for my assignment say:
You will be creating a program that reencodes encrypted text files. The files, which were used in the previous assignment, are comprised of several rows of five integers. The data is encrypted in two ways. First, the only appropriate data is found in even numbers; if the value in the file is an odd number, it must not be modified. Secondly, the data is encoded as the middle three digits of a nine digit number. The middle three digits represent an ASCII character value. You will have two tasks:
a) first, you must change the even-numbered encoded data so that the two or three ASCII digits are the first two or three digits in the number instead of the middle three digits; the odd-numbered values must not be modified but must be saved in their present position as found in the file. The data change will occur as follows: xxxyyyzzz will be changed to yyyxxxzzz; a specific example value 123456789 would be converted to 456123789. Note that since some of the ASCII values are two digits instead of three, the final number might be an eight-digit value instead of a nine digit value (e.g., 789062456 would be converted to 62789456).