Print digits of a number in words recursively (e.g., 123 → "one two three").
Difficulty: Hard
Phase: 3 · Recursion
XP Reward: 30 XP
Topics: Recursion, Hard
Supported Languages: Python, JavaScript, C, C++, Java
Problem Description
Given positive integer N, print its digits in words separated by space recursively (e.g., 123 -> 'one two three'). Input Format: Read input from standard input (stdin). Output Format: Print the result to standard output (stdout).
Constraints
- -10^9 <= N <= 10^9
Examples
Example 1
Input: 123
Output: one two three
Explanation: Sample execution for input 123