CSCI 1300
Introduction to Computing
Fall 1997
Programming Assignment #3
Due Sept. 19
- Modify your program for assignment #2 as follows:
- Create a function called error() that takes as a parameter a
string, then prints out "Error: ", the string, pauses so the user can
read the string, and then exits the program. Note: we wrote the error
function in class today, here it is: error.cc.
- Check all input values to the program using "if" statements,
calling error() if the input value is bad. The parameter to error()
should be a string describing the problem with the input value, such
as "age should be between 1 and 99", or "age must be a positive
number".
-
To hand in:
-
- Demo the running program to the TA.
- Hand in a printout of your program.