CS 1044 Intro. Programming in C, Spring 1999
Example Programs from Spring 99
Party
Music Program using struct variables. Note: the documentation
of this program is absolutely pathetic!
Example Programs from Fall 98
-
Simple
Calculator: Illustrates functions, parsing, enumerated type use.
-
Simple
Complex Number Arithmetic: Illustrates use of struct type variables
and functions.
Example Programs from Previous Semesters
-
fileio.cpp:
simple file I/O with EOF-loop
-
invoice.cpp:
line-by-line data processing with summary
-
order.dat: input
file for invoice.cpp
-
invoice.out:
output file for invoice.cpp
-
comiss.cpp:
switch, if..else, line-by-line, summary
-
sales.dat: input
file for commiss.cpp
-
comm.dat: output
file for commiss.cpp
-
reverser.cpp:
reversing a list with arrays
-
bincalc.cpp:
a binary calculator
-
dater.cpp: converting
date formats
-
dates.dat: input
file for dater.cpp
-
dates.out: output
file for dater.cpp
-
espn.cpp: organizing
data
-
ingames.dat:
input file for espn.cpp
-
where.dat: input
file for espn.cpp
-
schedule.out:
output file for espn.cpp
The Infamous Payroll Example Programs (available after Project 1 is due)
FuncPay.cpp:
function-based version of Payroll Program
ArrayPay.cpp:
Payroll Program with arrays
StructPay.cpp:
Payroll Program with an array of structs
NamesPay.cpp:
Payroll Program with employee names (C-style strings)
NamesPay.cpp:
Payroll Program with employee names (C++ string objects)
Send comments and inquiries to:
mcquain@cs.vt.edu
Last updated Monday, April 19 1999