Question: Consider the data file words.txt that you have-the input file. write a c++ program in the form as shown below taht computes the number of

Consider the data file words.txt that you have-the input file.

write a c++ program in the form as shown below taht computes the number

of words of length 1,2,3,4,...,19, and >=20 characters.use array

histogram_words to compute and store the lengths of the words in the

inpute file. write the computes statistics into another file

words_statistics.txt -the output file.

#include

#include

#include

using namespace std;

void word_length_statistics (ifstream& fin, ofstream & fout);

int main(){

ifstream fin;

ofstream fout;

//enter code here

word_length_statistics)fin,fout);

return 0;

}

void word_length_statistics(ifstream& ofstream&fout){

int histogram_words[21]={0};

//enter code here

}

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!