CIS105 Fall 2003 Lab07

Chapter 7 in Lab Manual, with the following important changes, modifications and hints.

What to turn in

:

Additional Hints, Clarifications, Notes and Changes

  1. Hint: For step 4(b), you need to do a for loop that goes from 2 up to the square root of the number. To do this, you need to use the sqrt(x) function. Use man sqrt to learn more about this function, and/or read about it on p. 146 of Deitel. Pay special note to "Error prevention tip 5.1" on that page.
  2. Hint: For step 4(b), when using the sqrt(x) function, you need to modify your compile step to be:
    cc -o lab4c lab4c.c -lm
    The -lm adds the math library functions to your linking step.
  3. Note: Later in the semester, we'll learn how to customize the the make command to include the -lm when you type make lab4c. This is done by creating a custom Makefile.
  4. Clarification: The lab manual indicates that you should read Chapter 5 in Deitel and Chapter 6 in Afzal before doing this assignment. Here's what I have to say about that:
  5. Change: The lab manual indicates to do problem 5.15 from Deitel for additional practice. You are encouraged to do this for practice, but you are not required to submit it, and you should not submit it to WebCT. You can show it to your TA in lab or to Dr. Conrad during office hours if you want feedback.

Phillip T Conrad
Last modified: Tue Oct 21 11:56:02 EDT 2003