UMBC CMSC 202 Fall '00 | CSEE | 202 | 202 F'00 | lectures | news | help |
The following are clarifications and further discussion on Project 2. Many of these items were generated based on questions received during lectures and in e-mails to Mr. Kukla and Ms. Mitchell. Check this page frequently to keep informed!
setw
and setprecision
stream manipulators in your book. There may be other stream manipulators that are useful as well. Don't forget to #include
the iomanip.h
header file.
int
. Duplicate values may occur, which is fine.
-lm
(that's
"dash ell em") to link in the math library. Failure to do this will result
in "unresolved" errors from the linker that ask for definitions of
functions like log.
n*n
, use code like: n*(double)n
and store the result into a double
. This eliminates the
problem of n squared growing so rapidly that your program generates invalid
results for very large sizes of n. Your program need only support array
sizes as large as the sample program does (number coming soon) but you may NOT
hardcode the maximum array size into your program to avoid allocating an array
of the correct size for each run.
Last Modified: Friday, 13-Oct-2000 16:04:38 EDT