
Remember to seed your rand by calling srand first.
You must create the histogram in a function. This is its header:
void generateHistogram(int hist[], int base)
You must also display your results using a method. This is its header:
void printIndexAndValue(int hist[], int base
string leader)
Extra Credit Alternatives
- You may implement this solution using the vector class.
- You may impose sort order so that the randomly generated numbers are ordered from least to greatest by number of occurrences.
Note: Using vectors and/or imposing sort order will require the use of either parallel or multidimensional arrays AND a sort function.
Sample Output
Here are screenshots of my code running.
Counting Digits output

Counting Digits with sort output
Refer to the deliverables post for comment formatting and required program identification information.
Due Date:
Monday, December 18th, 8:00am