Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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++

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

freedom bank recently traded in office fixtures here are the facts

Answered: 1 week ago