scramble number

please help me, what is the formula or code to scramble a given number for example the user will input 30198 and the output will be 13089 and it will be subtract to the original number 30198-13089=17109 it must not be equal to negative.
Topic archived. No new replies allowed.