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

Write a program that will read in a line of text and outputthe number of words i

ID: 3618151 • Letter: W

Question

Write a program that will read in a line of text and outputthe number of words in the line and the number of occurances ofeach letter. Define a word to be any string of letters that isdelimited by either whitespace, a periiod, a comma, or thebeginning or end of the line. You can assume that the inputconsists entirely of letters, whitespace, commas, and periods. Whenoutputting the number of letters that occur in a line, be sure tocount upper and lower case versions of a letter as the same letter.Output the letters in alphabetical order and list only thoseletters that do occur in the input line.
For example, the input line I say Hi. should be output similar to the following 3 words 1 a 1 h 2 i 1 s 1 y   Write a program that will read in a line of text and outputthe number of words in the line and the number of occurances ofeach letter. Define a word to be any string of letters that isdelimited by either whitespace, a periiod, a comma, or thebeginning or end of the line. You can assume that the inputconsists entirely of letters, whitespace, commas, and periods. Whenoutputting the number of letters that occur in a line, be sure tocount upper and lower case versions of a letter as the same letter.Output the letters in alphabetical order and list only thoseletters that do occur in the input line.
For example, the input line I say Hi. should be output similar to the following 3 words 1 a 1 h 2 i 1 s 1 y  

Explanation / Answer

please rate - thanks in response to your message #include #include using namespace std; int countwords(string); void letters(string,char[],int[],int& ); void sort(char[],int[],int); int main() {char b[26]; string input; int count,lets=0,i; int amount[26]; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote