CS35: Assignment 8

CS35: Programming and Problem Solving
Ray Ontko
Department of Computer Science
Earlham College

Due Monday, 1999/09/13

Reading Assignment

Read section 3.7 of Deitel and Deitel. Optionally, read section 1.5 of Kernighan and Ritchie.

Programming Exercise

Write a program which counts the number of vowels (AaEeIiOoUu) entered in the input. It should read character by character until the user enters a CTRL-D. (Holds the CTRL key down and types the "D" key).

When you run your program, the dialogue should look something like this (with appologies to Arlo Guthrie):

$ ./count_vowels
count_vowels -- counts the number of vowels entered as input.

Enter text followed by CTRL-D.
The name of this song is "Alice's Restaurant."
But that's not the name of the restaurant,
That's just the name of the song.
And, that's why I call this song "Alice's Restaurant."

There were 47 vowels entered.
$

Copyright © 1999, Ray Ontko (rayo@ontko.com).