Syllabus - http://people.umw.edu/~ernie/s220Sp2006.html
Home page for the course - http://people.umw.edu/~ernie/cpsc220/index.html
Check regularly for where we are, what we've done, what's
coming up, & updates
Develop an algorithm that will determine the largest of three numbers; include steps to input the three numbers.
What is an algorithm? -
A detailed sequence of actions to perform to accomplish some task. Named after an Iranian mathematician, Al-Khawarizmi.
Technically, an algorithm must reach a result after a finite number of steps, thus ruling out brute force search methods for certain problems, though some might claim that brute force search was also a valid (generic) algorithm. The term is also used loosely for any sequence of actions (which may or may not terminate). - From FOLDOC, http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=algorithm
Express the algorithm as a C++ program.
Implement your C++ program on paprika.umw.edu or another system on the CPSC LAN.
- Go to B13. Login in using your user name and password for the campus network
- Open a window on your desktop
- Use vi, vim, or the text editor tool to enter the source of your program. Save it in a file named largest.cpp.
- Compile the program and if the compilation is successful, put the run file in largest.R
cpp largest.cpp -o largest.R- If there are no errors or warnings then execute the program and capture the results in a script file. Enter the following
script
largest.R
.. enter the three values
exit
recall that this creates a file named typescript, that contains everything that appeared in the current window. Remember that you have to enter exit to terminate the script.- print the files named typescript and largest.cpp. (! Don't you dare try to print largest.R !) Turn in the hard copy of these files.
lp largest.cpp typescript
output is in B14.
For class on next Wednesday:

.