Problem 44293. Write out numbers in words
Write out numbers in words ( range [0-9999] ) with British spelling rules. For example;
- 1 > one
- 56 > fifty-six
- 100 > one hundred
- 105 > one hundred and five
- 245 > two hundred and forty-five
- 1520 > one thousand, five hundred and twenty
- 9999 > nine thousand, nine hundred and ninety-nine (maximum)
Solution Stats
Problem Comments
-
3 Comments
Christian Schröder
on 26 Mar 2023
Nice problem --- it could use a few more test cases though, especially corner cases like 1000, 1001, 1010 and so on.
Dyuman Joshi
on 26 Mar 2023
Test cases have been added to the problem.
Christian Schröder
on 26 Mar 2023
Thanks, Dyuman!
Solution Comments
Show commentsProblem Recent Solvers10
Suggested Problems
-
Project Euler: Problem 3, Largest prime factor
1586 Solvers
-
Getting the indices from a vector
10229 Solvers
-
Who is the smartest MATLAB programmer?
762 Solvers
-
225 Solvers
-
Create sequnce 1 4 9 16 25.........
382 Solvers
More from this Author92
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!