Question
String manipulation enables interesting approaches to analyzing the writing of great authors. Much attention has been focused on whether William Shakespeare ever lived. Some scholars
String manipulation enables interesting approaches to analyzing the writing of great authors. Much attention has been focused on whether William Shakespeare ever lived. Some scholars believe there’s substantial evidence indicating that Christopher Marlowe actually penned the masterpieces attributed to Shakespeare. Researchers have used computers to find similarities in the writing of these two authors. This exercise examines three methods for analyzing texts with a computer. Read a line of text from the keyboard and then perform the following tasks:
a) Calculate and print a table indicating the number of occurrences of each letter of the alphabet in the text.
b) Calculate and print the number of one-letter words, two-letter words, three-letter words, and so on, appearing in the text.
c) Calculate and print the number of occurrences of each different word in the text. The program should print the words in the table in the same order in which they appear in the text.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
include include include include using namespace std int main s...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started