Hints for questions on multi-dimensional arrays

This is the second programming milestone

Refer back to the example which counted frequencies of numbers in ranges.

  1. Modify the programme to hold the frequency count in an array.
    This is very straightforward. No hints provided.

  2. In the first programming milestone you added the capability of printing out a horizontal bar chart of frequencies. Now you are asked to modify this further to print out a normal vertical histogram, in a format similar to the following example.
       **
    ** **
    ** **
    ** ** **
    ** ** ** **
    
    Think of how you could represent the screen inside your program. One way is to use a two dimensional array of char, which will represent the grid of characters you want to print out to show the histogram. Instead of printing straight to the screen, create the image inside this array and then print out the array.
Back to the questions.
Back to the notes on multi-dimensional arrays.