Skip to content

tjaart-code/Number-to-word-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Number to word converter.

Run the Program

Run the compiled Java class with the java command, passing any number you want to convert as a command-line argument.

For example:

java WordConverter 123456

You should see output like:

Input: 123456
Output: one hundred twenty three thousand four hundred fifty six

Notes:

You can run the program with different numbers as arguments, including negative numbers like -456.

java WordConverter -456

This would output:

Input: -456
Output: negative four hundred fifty six