Skip to content

This is a small project whose purpose is to turn numbers into words

Notifications You must be signed in to change notification settings

adrianoted/wordy-numbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wordy-Numbers

This is a small project whose purpose is to turn numbers into words.

Rules

positive integers - Print number in english.

  • Numbers between 20 and 99 use hyphens. e.g. forty-five
  • Use a space to separate all other words. e.g. one hundred twenty-three
  • The word 'and' is used to separate the tens space from the hundreds space in each period
  • ...also the word 'and' is used to separate the tens and ones space from the lowest number the left of the tens place for numbers over 1000.
  • Support integers up to ±2 Quadrillion .
  • Consult this list for large number names. Always use the 'short scale' popular in the USA.

Zero/nil - Print 'zero'.
Negative integers - Print 'negative' before the number
Decimal numbers - Print the number to the left of the decimal then 'point' then the numbers to the right of the decimal each digit at a time. ( Support at least 5 decimal places).
Non-numbers - Strings that evaluate to numbers should be converted to numbers. NaN values must throw an error.
Positive / Negative infinity - Print 'infinity' or 'negative infinity'

Scripts

npm install

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

npm run test

Launches the test runner in the interactive watch mode.

About

This is a small project whose purpose is to turn numbers into words

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published