I am trying to write a program that will generate 100 random numbers
between 1 and 50. Using these numbers, generate a list that will tell the
number of random numbers that fell between 1-5, 6-10, 11-15, 16-20, ... ,
and 46-50. I want to then print out the results as a histogram. Basically
it might look like this:
1-5 (11) ***********
6-10 (8) ********
11-15 (12) ************
16-20 (9) *********
21-25 (10) **********
26-30 (11) ***********
31-35 (7) *******
36-40 (8) ********
41-45 (13) *************
46-50 (11) ***********
Any ideas or tutorials on histograms would be helpful. Also I need to know
how to generate random numbers then group them. At least if I could do this
without the histogram that would lead me in the right direction. I have
this started, but I know that it is not right. It will generate the
numbers but that is all I have so far.
Any help is appreciated....
--
Message posted using http://www.talkaboutprogramming.com/group/comp.lang.c/
More information at http://www.talkaboutprogramming.com/faq.html