This assignment has one goal:
The due date is: Friday, September 27th, 1996 in class. You should expect to spend between three to five hours of computer time over the next week. This time will save you time on the later assignment three and may help you pass the midterm! You should also expect to spend one to two hours of thinking time, depending on how much prior programming experience you have. As usual, we will not accept late assignments.
Part 1: In file a3-main.c we provide a main program. DO NOT CHANGE THIS PROGRAM. The task is to create a pair of functions that make the given "main" program/function work as advertised. You may include the functions in the same file as the given main program or compile them separately as discussed in class - it is your choice. For grading purposes we will be compiling your functions separately and running them against our own main program.
Therefore you need to build two functions:
For example, if you write the functions in a file called my_functions.c and compile this file into a re-useable object called my_functions.o with the command "cc -Aa -c my_functions.c", and similarly compile the main program stored in a3-main.c into a re-useable object called a3-main.o using "cc -Aa -c a3-main.c", then you can make an executable a3-main (by linking the two re-useable objects together) with the command "cc -Aa -o a3-main a3-main.o my_functions.o".
Now, executing the program "a3-main" should give the following output - exactly ...
All is well with main - strange_cube! Let's call display_cube once with VAL3! We expect 3375. Strange Cube of 15.00 is 3375.00 ! That's all folks!
To get credit for this assignment, you must electronically turn in ONLY THE FUNCTIONS you created in Part 1. These should be in a file called: my_functions.c.