So I have to find the inverse of an N input number. Example: 3456 --> 6543. This input number has N digits so have to find a generalized solution. I would have liked the pseudocode solution because I am just a beginner and all these solutions I am finding anywhere else have the only pr. language-specific solutions. For me this task seems very hard, so would appreciate some help:) I already found the inverse for a 3 digit number, but this is way harder. Thank you in advance!
Asked
Active
Viewed 21 times
0
-
1The easy way is to convert it to a string and reverse the string. – khelwood Mar 26 '21 at 00:30
-
Try [searching](https://stackoverflow.com/search?tab=relevance&q=%5bjava%5d%20reverse%20number), and ye shall find solutions! – Andreas Mar 26 '21 at 00:33