Question: 1. Write function reverseNum(n) that takes a positive integer, n, as input and retums the integer whose digits are the reverse of those in n.
1. Write function reverseNum(n) that takes a positive integer, n, as input and retums the integer whose digits are the reverse of those in n. Assume that the input does not end in O. For example reverseNum(12405) would return 50421 IMPORTANT RESTRICTION: you may not use any string operations. Yes, it would be easy using string operations but your job her is to do it with math operations
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
