Lab 4
CS 1005, C0term 03
February 5, 2003
You are to complete a partially-written program by providing a function that
will sum all the integers in a given range. The user provides the lower and
upper bounds of the range. For example, if the user specifies 6 for the
lower bound and 12 for the upper bound, the program will print the number
63 (the sum of the numbers from 6 to 12).
- Sign the attendance sheet.
- Copy the partially-completed program to your directory:
cp /cs/cs1005/labs/lab4/lab4.cxx .
- Complete the program by writing the function that calculates
the sum. You will also need to insert the function prototype and the
function call into the program.
- Use the `script' command to record your program executing. Name
your script file lab4.script.
- Turn in the `.cxx' file and your script file, using the turnin program. Use
the following syntax at the UNIX prompt:
/cs/bin/turnin submit cs1005 lab4 lab4.cxx lab4.script
Glynis Hamel
2003-01-17