Skip to content

akbortoli/write-numbers-using-words

Repository files navigation

Writing Numbers Using Words

How to Write Out Numbers Using Words

Writing out numbers can be intimidating. Fortunately, in most situations, you just need to make things clear enough to avoid major confusion and disputes. For example, when writing a check, banks will only reference the words to verify the numerals written elsewhere on the check.

A few examples:

Input Output
0 "zero dollars"
0.12 "twelve cents" or "12/100"
10.55 "ten dollars and fifty five cents" or "ten dollars and 55/100"
120 "one hundred twenty dollars"

Testing

Read tests/Treasure/MoneyTest and run ./vendor/bin/phpunit to verify it works.

About

How to Write Out Numbers Using Words

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages