Question: Write a C + + program that produces a report from an input file. The program considers the words that occur in the input file.

Write aC++program that produces a report from an input file.
The program considers the words that occur in the input file.
The C++ program file name must be "z1234567.cxx", where z1234567 is your Z-id to yield an executable called z1234567
The executable is invoked from the command line with a file name as argument:
./z1234567 input.txt
your program should read all lines in the file
lines that start with the "#' character are ignored
punctuation characters like ".,;()" are ignored
your program should report 4 things:
the number of words in the file
which word size occurs the most and how many times
the largest word length in the file and how often words of that length occur
all words that are of the longest word length in the file, not reporting duplicates
Write a C + + program that produces a report from

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 Programming Questions!