2017-03-28

posted Mar 28, 2017, 7:05 AM by Samuel Konstantinovich   [ updated Mar 28, 2017, 8:30 AM ]
Goal: numToWords

You should have 0-99 working.

1. Extend this to work up to 999. 
Think of how we say numbers greater than 99:

100
300
600
All follow the same pattern.

134
523
801
These also follow a pattern.
 
2. Extend this to work up to 999,999. 

1,000
29,000 
431,000
All of these follow the same pattern.

Also:
1,432
29,053 
431,901
These also follow a pattern.

See if you can solve a project Euler problem. (You can make an account to track your correct answers)
https://projecteuler.net/problem=17
Hint: 2x,xxx is the right ballpark

Finally:
Count the letters in the words that represent the numbers in the range:   [0, 999999]
0 to 999,999 inclusive.
hint: 50,xxx,xxx
Comments