cs1124 rec01

programming assignment

You must write the program for the following problem and show your working program to the lab worker before you go.
If you cannot finish it in time, make arrangements with your helper to show your completed work to him at the next lab or before.

 

Problem:

Write a C++ program that will display itself on the screen and then state the number of words that are in the program file.

Notes:

You know the filename so there will be no interaction with a user to get the name.
Make sure you test that the file opened correctly.
Do NOT use .eof() in this program.
A "word" for this program is separated by whitespace so
x = x + 2;
y = -2324;
is 8 words but
x = x+2;
y = -2324;
is 6 words.