Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Message
| This is the problem:
Converting: two trillion four hundred thirty-two billion eight hundred seventy-six million three hundred forty-five thousand nine hundred twenty-three
Processing word: two stack is: 2
Processing word: trillion stack is: 2000000000000
Processing word: four stack is: 2000000000000, 4
Processing word: hundred stack is: 2000000000000, 400
Processing word: thirty stack is: 2000000000000, 400, 30
Processing word: two stack is: 2000000000000, 400, 32
Processing word: billion stack is: 2000000000000, 400, 32000000000
Processing word: eight stack is: 2000000000000, 400, 32000000000, 8
Processing word: hundred stack is: 2000000000000, 400, 32000000000, 800
Processing word: seventy stack is: 2000000000000, 400, 32000000000, 800, 70
Processing word: six stack is: 2000000000000, 400, 32000000000, 800, 76
Processing word: million stack is: 2000000000000, 400, 32000000000, 800, 76000000
Processing word: three stack is: 2000000000000, 400, 32000000000, 800, 76000000, 3
Processing word: hundred stack is: 2000000000000, 400, 32000000000, 800, 76000000, 300
Processing word: forty stack is: 2000000000000, 400, 32000000000, 800, 76000000, 300, 40
Processing word: five stack is: 2000000000000, 400, 32000000000, 800, 76000000, 300, 45
Processing word: thousand stack is: 2000000000000, 400, 32000000000, 800, 76000000, 300, 45000
Processing word: nine stack is: 2000000000000, 400, 32000000000, 800, 76000000, 300, 45000, 9
Processing word: hundred stack is: 2000000000000, 400, 32000000000, 800, 76000000, 300, 45000, 900
Processing word: twenty stack is: 2000000000000, 400, 32000000000, 800, 76000000, 300, 45000, 900, 20
Processing word: three stack is: 2000000000000, 400, 32000000000, 800, 76000000, 300, 45000, 900, 23
Result = 2032076047423 length = 13
Processing "four hundred thirty-two billion" it is not associating the "four hundred" with the "thirty-two billion".
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|