can anyone give me a hint on how to convert a digit to its english description?

...
Last edited on
say int n< 1billion.

n = 999,777,321

count how many digits n have.
make segments.
keep 999 in millions
777 in thousands.

321 > 3 for hundred, 2 from (twenty, thirty... ninety ) 1 from (one, two...nine)
when 21 is between 11-19 use hand coded (eleven...nineteen)

999 and 777 part is similarly as 321
Topic archived. No new replies allowed.