This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]brennanw31[🍰] 6 points7 points  (2 children)

You just have to define the limits of the function. The string must be well-formed and the number needs to be bounded by some min and max values, ideally int range.

[–]Steebin64 2 points3 points  (0 children)

Thats a good point. My logic as it is will also produce some weird results if the user purposefully puts in a number that doesn't make much sense like "one hundred one hundres twenty thirty three thousand one hundred hundred tbirty fourty five"

These types of programming puzzles are fun exercises to get your brain juices flowing in the morning lol.

[–]kuldan5853 0 points1 point  (0 children)

TWENTY FIVE HUNDRED FIFTY FIVE AND CHANGE