CS 3113: Project 0

Goals

The goals of this project are to:

Proper Academic Conduct

The code solution to this project must be done individually. Do not copy solutions to this problem from the network and do not look at or copy solutions from others. However, you may use the net for inspiration and you may discuss your general approach with others.

Specification

Program Invocation

The command-line interface to your program is as follows:
./project0 [u]

Program Behavior

Your program will accept lines of input until an end-of-file (EOF) is reached, at which point it will terminate.

Notes:

Examples

Program Invocation
./project0

Input Text

192
18
23400
100001
Output Text
one hundred ninety two
eighteen
twenty three thousand four hundred
one hundred thousand one


Program Invocation

./project0 u

Input Text

123456789
12000018
14000
101
11
1
01
00001
000
Output Text
ONE HUNDRED TWENTY THREE MILLION FOUR HUNDRED FIFTY SIX THOUSAND SEVEN HUNDRED EIGHTY NINE
TWELVE MILLION EIGHTEEN
FOURTEEN THOUSAND
ONE HUNDRED ONE
ELEVEN
ONE
ONE
ONE
[OUTPUT NO TEXT FOR THIS CASE, JUST THE NEWLINE]


Program Invocation

The following example invocations must result in an error message being printed and the program terminating:

./project0 a

./project0 u a

./project0 u a b


Submitting Your Program


Grading Criteria


Testing

You are responsible for generating your own test cases.

We have provided a couple of samples to get you started, but keep in mind that we have other tests that are hidden from you.


Hints


Addenda


andrewhfagg at gmail.com

Last modified: Tue Sep 10 11:20:53 2019