[Previous Homework]
[Next Homework]
Develop an interactive application in which the user enters a number less than 1000. Convert the number to the word representation of the value and print it out.
From Linux on the GL machine:
Make sure that you follow all the coding standards
hw19 - Strings 2
Develop an interactive application in which the user enters a number less than 1000. Convert the number to the word representation of the value and print it out.
-
Structure your code according to the following:
-
getInput()
-
Read in integer value from the user
Return the integer value from the function
-
Work from left to right in the numeric sequence
Each place should have it have its own function
-
In each function, define an array of strings;
-
e.g., "one thousand", "two thousand",...
From Linux on the GL machine:
-
Compile the program:
gcc -o string2 string2.c
Run the program to make sure it works:
./string2
Use the SUBMIT utility turn in the homework.
submit cs104_grasso hw19 string2.c string2
Reference Programs :
Make sure that you follow all the coding standards