CSC 215

Fall '98

Section 701

Example Programs

Program Description Discussed
hello.cpp Prints "Hello, world!" September 15th
sphere1.cpp Computes the volume of a sphere September 15th
sphere2.cpp Computes the volume of a sphere using a function September 15th
sphere2a.cpp Computes the volume of a sphere using a function September 15th
convert1.cpp Converts currency amount September 22nd
convert2.cpp Computes amounts from different currencies September 22nd
convert3.cpp Computes amounts from different currencies; performs some error checking on input September 22nd
convert4.cpp A more modular form of convert3.cpp September 29th
convert5.cpp A looping version of convert4.cpp September 29th
lotto1.cpp Compute the odds on the lottery September 29th
lotto2.cpp Improvement of lotto1.cpp October 6th
lotto3.cpp Repeatedly compute the odds on the lottery October 6th
lotto4.cpp Improvement of lotto3.cpp October 6th
lotto5.cpp Improvement of lotto4.cpp that uses functions to get input October 6th
lotto6.cpp Uses two different functions to get input October 13th
sumfile.cpp Sums a list of integers from a file October 20th
sumfile2.cpp Sums a list of integers from a file October 27th
sumfile3.cpp Sums a list of integers from a file given by the user October 27th
copytext.cpp Copies one text file to another October 27th
encrypt1.cpp Encrypts a text file October 27th
decrypt1.cpp Decrypts a text file encrypted using encrypt1.cpp October 27th
scores.cpp Prints a report from a student data file students.txt November 3rd
average.cpp Computes and prints the average of values in an array November 3rd
standdev.cpp Computes and prints the standard deviation of values in an array November 3rd
sortarray.cpp Sorts and prints an array of integer values November 10th
datestruct.cpp Demonstrates use of a struct for storing dates November 17th
dateclass1.cpp Demonstrates use of a class for storing dates November 17th
dateclass2.cpp A more realistic definition of a date class November 17th