CST 8110 - Assignment Ten

Last revised: Thursday, July 3, 1997.

A print-out of this program is due in my assignment box by 13:45pm Monday, July 7.

All assignments are evaluated based on their neatness and how closely they follow the assignment submission guidelines published in the online course notes.

Purpose and Instructions

This program increases your knowledge of how C Language functions are used. You begin by writing your own simple functions to draw ASCII Art figures on the screen, using the Algonquin formatting guidelines from the Blue Book.

  1. Read the text, sections 3.1, 3.2, 3.3, and 3.4. This explains how functions work.
  2. Read the Algonquin 8110 Blue Book, pages 33-35. This explains how you must add Algonquin Headers to each of your functions. (See the one-function example program on pages 36-37, too.)
  3. Write the following program using functions:

You will combine parts of three examples from the text.

Combine Figure 3.16, a function that writes instructions on the screen, with Figure 3.14, a C program using C language functions that you write yourself, and with Figure 3.7, a program that uses the C Library function sqrt().

Your one combination program should do these three things, in this order:

  1. First, show the ASCII Art output using the functions taken from the program in Figure 3.14.
  2. Next, use a function to print some prompting instructions on how to enter values for the square root calculations that your program will do in part three, below. Your prompting function should look similar to the function in Figure 3.16. Do not write the program mentioned in Figure 3.16.
  3. Do the input, output, and calculations of the square root program copied from Figure 3.7. The prompts for input will be printed by the modified instruct() function from part two, above.

Write one program that does all three things, in the above order. Copy from the figures in the text the relevant parts of each of the examples and put them all into one program. Verify that each of the three parts of your combined program produces the correct output.

Hand in: The source listing of your combination program. No cover page is necessary; your Algonquin program header will have all the required information.

As always, the program must follow Algonquin standards for headers and format. Each function that you write must have its own Algonquin header. The algorithm you design or use to solve the problem in each header must use pseudocode where appropriate.


The aggregate of all assignment marks comprises 25% of your final mark. All assignments must be completed satisfactorily to get credit for the course, even if the assignments are submitted too late to receive a mark. (See the course outline.)

Late assignments are handled according to the policy given in the course outline.