How do you get the inverse of this transformation?

Ok so I'm doing a programming exercise which gives me a method of encryption, one of the steps is to +7 then mod 10

besides from the encryption application itself I must also decrypt... but surely this is impossible.

mod provides a many-to-one relationship for example (3 mod 10 = 3) and (13 mod 10 = 3) so information is lost making it impossible to decrypt (atleast thats what my common sense says)

unless I've missed something, maybe I must get additional information from the user but then what would that be and how would it be applied?

how can you reverse that kind of transformation in the simplest way?

thanks

Re: How do you get the inverse of this transformation?

Yes, your common sense is correct. The step can only possibly be reversed if there were 10 or fewer symbols being encrypted.

But if that step occurred as *part* of an encryption process it is quite possible that the process as a whole can be reversed.