amount, return it written out in words.
Formatting rules:
- every word is capitalized and words are separated by exactly one space, with no hyphens or commas;
- the word And is never used: 105 → "One Hundred Five";
- the scale words are Thousand, Million and Billion; any group equal to zero is skipped;
- zero is written as "Zero".
Vocabulary: One to Nineteen (Eleven, Twelve, Thirteen, Fourteen, Fifteen, Sixteen, Seventeen, Eighteen, Nineteen), the tens Ten, Twenty, Thirty, Forty, Fifty, Sixty, Seventy, Eighty, Ninety, and Hundred.amount=508 → 'Five Hundred Eight'
Five hundreds and an eight, with no "and" and nothing for the zero tens: "Five Hundred Eight".
amount=40015 → 'Forty Thousand Fifteen'
40 thousand and 15: "Forty Thousand Fifteen".
amount=2000300001 → 'Two Billion Three Hundred Thousand One'
amount=508
'Five Hundred Eight'
Run checks the first 3 tests in your browser. Submit checks all 73 tests on the server, hidden ones included.