CIS105 Fall 2003 Lab07
Chapter 7 in Lab Manual, with the following important changes, modifications and hints.
What to turn in
:
- Turn in two script files:
lab7a.txt script file and
either lab7b.txt OR lab7c.txt. Read on for
a further explanation.
- Grading is based on the criteria listed on p. 114 of the lab
manual. The "A points" part is based on the extra stuff you add to
get from lab7b.c to lab7c.c. That's why you don't have to turn in
both of these.
- If you are successful in getting lab7c.c to work properly, then
turn in script files lab7a.txt and lab7c.txt. This will qualify you
for the 10 points assigned to the "A" grade.
- Or,if you can't get the extra stuff working (i.e. steps 4(a) and
4(b) on p. 72), then you may turn in just lab7a.txt and lab7b.txt
(forfeiting the 10 "A" grade points.).
Additional Hints, Clarifications, Notes and Changes
- 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.
- 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.
- 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.
- 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:
- Chapter 5 in Deitel is essential for this lab. You are strongly
encouraged to read it before attempting the lab.
- Chapter 6 in Afzal covers advanced features of the vi editor. There
is nothing specific in this lab that requires you to read Chapter 6 in
Afzal. However, if you use vi, the sooner you learn about these advanced
capabilities of vi, the better off you will be. Editing your programs
is so much easier when you have a good grasp of the features of
your text editor!!!
- 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