English Numbers
This problem is form the PACISE Programming Contest, Spring 1997, hosted by
Clarion University of PA.
Input File: problem1a.dat
Output File:
Description:
Convert integers in the range 1-9999 into English
phrases. The first integer in the file is the number
N of conversions to do. Read and convert the N integers
that follow. English words in the output phrase for one
integer should be separated by a single space execpt
hyphens should be used to write the English eqivalent of
portions of an integer in the range 21 - 99 (but only if the last
digit of the integer is not zero). No other punctuation, spaces,
or filler words (such as and) should be used.
Sample Input:
3
1976
617
20
Sample Output:
one thousand nine hundred seventy-six
six hundred seventeen
twenty