Design a program that generates a sequence of N random numbers. The numbers lie between 1 and 9 inclusively. The program counts the number of times each number appears in the sequence. It then counts the number of times each count appears the list of counts. Suppose N = 100. The first table displays the number of times each number appears in the sequence of N numbers. The second table displays the number of times each count appears in the first table. “9” appears once in the first table, “10” appears twice in the first table and so on.
1st table
1 10
2 11
3 10
4 14
5 13
6 10
7 9
8 10
9 13
2nd table
9 1
10 4
11 1
13 2
14 1