CS 117 Programming Examples
- From class on 3/25/96. Three "hello world" programs
(hello.p,
hello2.p,
hello3.p)
and a program with a function (dogYears.p).
- From class on 4/8/96. readwrite.p
illustrates the use of an array of characters to gain
extra control over string input. This program was written on the fly
during class, and lacks comments and planning, so beware.
- From class on 4/12/96.
max.p
and
varval.p
- From class on 5/8/96. Quilt programs
(patchTester.p and
quilt.p)
and sorting programs
(sort.p and
sort2.p--both contain
SelectionSort, and sort2.p has BubbleSort, too).
- From class on 5/13/96. Recursion intro.
(loopy.p,
recursion1.p,
recursion2.p,
and recursiveArtist.p).
- From class on 5/15/96. More recursion.
(recursiveMax.p,
hanoi.p,
and fib.p)
- From class on 5/20/96. Linked lists.
(lists.p)
- Programs using text files for
input (inputFiles.p)
and output (outputFiles.p)
- For use in final projects. If you want to respond to a keystroke
immediately, without waiting for the user to hit the ENTER key,
the program keytest.p might
help you.
Jeff Ondich,
Department of Mathematics and Computer Science,
Carleton College, Northfield, MN
55057
(507) 663-4364,
jondich@carleton.edu