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
Recommended Answers
Jump to Postdragonbone,
Don't post source code
until opening poster has put some effort.
Use int main().I use int main() - Depending on the exit code of the executable the initating application can determine if the invocation was a successful one or a failure. Its good when someone wants …
All 5 Replies
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.