Hi, everyone. I'm completely new to the forum and C++.
This is my forth program for the c++ programming class. I don't have a clue what i should do to get my hand on this program.
here it is:
You are to write a C++ program that will scan a text file and do some elementary analysis that might indicate how difficult the text is to read. In particular, your program will:
1. Determine the average length of all the words in the text
2. Find the longest word in the text and display it
3. Determin the average number of words in each sentence
4. Find the longest sentence and display it
"Mr." is not an actual word.
You are allowed to use while, if , else condition only, no For condition
This is what I got so far, I don't know what I should do next.
using namespace std;
string space = " ";
bool run = true;
cout << "Please insert the file name: ";
cin >> fileName;
cout << fileName << " cannot be found." << endl;
cout << "Please try again, do you want to quit? (y/n)";
cin >> getout;
if (getout == "y")
cout << "You decide to stop the program \n";