Problem

Reverse the digits of a positive int (123 → 321). Use recursion.

Examples

  • reverseInt(123) -> 321
  • reverseInt(5) -> 5
Compile and test (Ctrl+Enter)