CS 173 Code Examples


The programs I'm making available on this page are *not* examples of good coding style. They are simply intended to succinctly illustrate some aspect of C++ code.
boolexp.cpp
cmath.cpp
dot.cpp
endl.cpp
eventloop.cpp
expression.cpp
fileioavg.cpp
fileio.cpp
getline.cpp
identifiers.cpp
if.cpp
increment.cpp
input.cpp
intdiv.cpp
nested.cpp
output.cpp
outputformatting.cpp
precedence.cpp
precision.cpp
shortbad.cpp
shortcomments.cpp
short.cpp
shortoneline.cpp
statements.cpp
statements.pre
temperature.cpp
template.cpp
thanks.cpp
choose.cpp
choosereference.cpp
function.cpp
scope.cpp
valref.cpp
assert.cpp

dowhile.cpp
for.cpp
graderesp.cpp
continue.cpp
sizeof.cpp

intmax.cpp
limits.cpp
modulus.cpp

enum.cpp
enumtest.cpp
typedeffloat.cpp
typedefmix.cpp

struct.cpp
union.cpp
hierarchical.cpp

brain.h
brain.cpp
brainmain.cpp

brainarray.cpp

complex.h
complex.cpp
complex_main.cpp