Question: c++ Question 3 Write a program that reads the following sentences from a file: I am Sanm Sam I anm That Sam I am That

c++

c++ Question 3 Write a program that reads the following sentences from

Question 3 Write a program that reads the following sentences from a file: I am Sanm Sam I anm That Sam I am That Sam I am I do not like that Sam I am Do you like green eggs ana ham? I do not like them But I do like spam You will first have to create the text file containing the input, separate from your program. Your program should produce two output files: (i) one with the whole text in uppercase and (ii) another one with statistics about the text. The latter should present the number of characters in the whole text, the length of each line, the longest line, a count of each time a letter appears in the file (s and S are the same letter; only display letters if their count > 0), and the number of lines in the original file. These statistics should be calculated using both arrays and vectors. Use an array for the second statistic and a vector for the fourth one. The content of both files should also be presented on screein

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!