Our Second Programming Assignment

The goal of this assignment is for you to complete the program
we started writing in class, compile it and run it.

The Assignment:

  1. Type in the program exactly as you see it.  You can even cut and paste, if you can figure out how to do it.
  2. Save the program as namegame.c
  3. Make changes in the two places indicated.  See below for some pointers
  4. Compile it.  (g++ namegame.c)
  5. To run the program, type  a.out  at the command prompt.
Some Pointers
  1. The characters "||" mean "OR"  So the expression "this || that" for example, returns true if either this or that is true, or both.
  2. The phrase "break" inside of a loop causes the program to exit the loop at that point, even if the loop wasn't "done" yet.  The "for" loop in the program has a "break" in it which causes us to exit the loop as soon as we find the vowel.
  3. The name game works as follows:  The user enters a name, such as "Robert, " The output is:
  4. The "root" which gets repeated from line to line is the portion of the name beginning with the first vowel found in the name.
What you should turn in:
At a command prompt, type the following line

whoami | a.out | lpr

This should generate a printout, which is what you need to hand in on Tuesday.
Note that this will print out in the Austin lab, even if you are doing it from home.
Again, you need to remember that only the computers near the wall will print.
Hopefully, this will be fixed soon.