Question: C++: Write a program that reads a stream of characters from the input and generates a histogram of the number of times each of the
C++:

Write a program that reads a stream of characters from the input and generates a histogram of the number of times each of the upper-case letters appears. Separately count every character that is not an upper-case letter. Plot your final histogram using Xs to create a series of horizontal bars, as shown below. The output should be scaled so that the largest histogram value consists of forty Xs, and everything else is scaled appropriately. Every letter with a non-zero count should have at least one X in its histogram. After printing the histogram, print a final line that shows the count of all of the characters that were not upper-case letters. Use the sample-text.txt file available on the web site to test your program. Recall that you can use the Unix input redirection command, "", to read a file. Be sure to use appropriate functions to make your code easy to read and understand. A: XXXx Number of non-lower-case letters 12345
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
