Due Monday, 1999/09/20
Choose one of the following programs for your first project. Write a program which implements the described functionality, and test it on one or more input files of your choosing. Turn in a print-out of the working program, a print-out of the input file, and a print-out of the output of your program (or, you can send all three to me in an e-mail).
Write a program which reads character input and counts the number of occurrences for each letter of the alphabet, along with the total number of alphabetic letters read, and then prints a summary showing the percentage for each letter.
The dialogue from your program should look something like this:
$ ./letter_freq < sonnet_1.txt a 6.5 % b 2.3 % c 1.5 % ... x 0.0 % y 4.4 % z 0.1 %
Of course, you will need to produce your own input file. In this example, the file "sonnet_1.txt" contains the text for a Shakespearean sonnet.
Write a program which reads numeric input and calculates the minimum, maximum, average, sum, and count for the list of numbers entered, and then prints these values.
The dialogue from your program should look something like this:
$ ./simple_stat < 19990913.dat Count: 48 Min: 139.000000 Max: 1037.000000 Avg: 603.942000 Sum: 28989.216000 $
For testing purposes, you will need to produce your own input file. In this example, the file "19990913.dat" contained 48 numbers.
Copyright © 1999, Ray Ontko (rayo@ontko.com).