Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In this assignment, we will analyze the body text of a large book, which you can

ID: 3686488 • Letter: I

Question

In this assignment, we will analyze the body text of a large book, which you can retrieve from the Gutenberg project: http://www.gutenberg.org/cache/epub/18209/pg18209.txt

Write a C++ program that finds out:

1. The number of lines in the text

2. The total number of characters (including, number, letters, symbols, etc.)

3.The total number of letters

4. The total number of capital letters

5. The number of characters of the longest line in the file

6. The largest word in the file

Do not upload the file pg18209.txt with your program. Just the cpp file. Hint: Use the “getline()” function.

Explanation / Answer

#include using namespace std; int main() { char s[50]; int i; int capitals = 0; int u; int total characters = 0; int n; int number = 0; int o; int largest word = 0; cout