Hello! Could You please help to solve this? My question is how to reverse a number in decimal notation using recursive function.
1234 => 4321
2 => 2
20 => 0
20000 => 2 (yes!)
0 => 0
The maximum length of test input is 5 numbers. No need to check for negative inputs or too large numbers. It should be used the division with 10, sprintf() and atoi() functions.
Thanks for your help!
Creator00 0 Newbie Poster
dragonbone -3 Newbie Poster
Creator00 0 Newbie Poster
kvprajapati 1,826 Posting Genius Team Colleague
dragonbone -3 Newbie Poster
kvprajapati commented: It's not a proper way. -3
Creator00 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.